Versioned.CallByName Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Executes a method on an object, or sets or returns a property on an object.

Namespace:  Microsoft.VisualBasic.CompilerServices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

Syntax

'Declaration
Public Shared Function CallByName ( _
    Instance As Object, _
    MethodName As String, _
    UseCallType As CallType, _
    ParamArray Arguments As Object() _
) As Object
public static Object CallByName(
    Object Instance,
    string MethodName,
    CallType UseCallType,
    params Object[] Arguments
)

Parameters

  • Instance
    Type: System.Object
    Required. Object. A pointer to the object exposing the property or method.
  • MethodName
    Type: System.String
    Required. String. A string expression containing the name of the property or method on the object.
  • UseCallType
    Type: Microsoft.VisualBasic.CallType
    Required. An enumeration member of type CallType enumeration representing the type of procedure being called. The value of CallType can be Method, Get, or Set.
  • Arguments
    Type: array<System.Object[]
    Optional. ParamArray. A parameter array containing the arguments to be passed to the property or method being called.

Return Value

Type: System.Object
Executes a method on an object, or sets or returns a property on an object.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.