Share this page

# InvokeStaticMethod

.NET Vuser Functions

Invokes a static method.

    object InvokeStaticMethod(Type type, string methodName, int metadataToken, object[] parameters);

type | The method type.
methodName | The name of the method.
metadataToken | The metadataToken of the method.
parameters | The method parameters.

InvokeStaticMethod Invokes a static method and returns the result of the method invocation.

Note: Do not add this function manually to a script. It is generated by VuGen automatically.

## Parameterization

Parameterization is not applicable to this function.

## Example

This example invokes the static method named InternalGetInstance.

Copy code

    public static AccessModifiers.PublicClass InternalGetInstance(AccessModifiers.PublicClass instance) {
        object[] parameters = new object[] {instance};
        object result =  LrReplayUtils.InvokeStaticMethod(typeof(AccessModifiers.PublicClass), "InternalGetInstance", 100663361, parameters);
        return ((AccessModifiers.PublicClass)(result));
    }

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: