NewLateBinding.LateSet 方法
定义
执行后期绑定属性设置或字段写入调用。Executes a late-bound property set or field write call. 此帮助器方法不宜从您的代码直接调用。This helper method is not meant to be called directly from your code.
重载
| LateSet(Object, Type, String, Object[], String[], Type[]) |
执行后期绑定属性设置或字段写入调用。Executes a late-bound property set or field write call. 此帮助器方法不宜从您的代码直接调用。This helper method is not meant to be called directly from your code. |
| LateSet(Object, Type, String, Object[], String[], Type[], Boolean, Boolean, CallType) |
执行后期绑定属性设置或字段写入调用。Executes a late-bound property set or field write call. 此帮助器方法不宜从您的代码直接调用。This helper method is not meant to be called directly from your code. |
LateSet(Object, Type, String, Object[], String[], Type[])
执行后期绑定属性设置或字段写入调用。Executes a late-bound property set or field write call. 此帮助器方法不宜从您的代码直接调用。This helper method is not meant to be called directly from your code.
public:
static void LateSet(System::Object ^ Instance, Type ^ Type, System::String ^ MemberName, cli::array <System::Object ^> ^ Arguments, cli::array <System::String ^> ^ ArgumentNames, cli::array <Type ^> ^ TypeArguments);
public static void LateSet (object Instance, Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, Type[] TypeArguments);
public static void LateSet (object? Instance, Type? Type, string MemberName, object?[]? Arguments, string?[]? ArgumentNames, Type[]? TypeArguments);
static member LateSet : obj * Type * string * obj[] * string[] * Type[] -> unit
Public Shared Sub LateSet (Instance As Object, Type As Type, MemberName As String, Arguments As Object(), ArgumentNames As String(), TypeArguments As Type())
参数
- Instance
- Object
公开属性或方法的调用对象的实例。An instance of the call object exposing the property or method.
- Type
- Type
调用对象的类型。The type of the call object.
- MemberName
- String
调用对象上的属性或方法的名称。The name of the property or method on the call object.
- Arguments
- Object[]
一个数组,包含要传递给正在被调用的属性或方法的参数。An array containing the arguments to be passed to the property or method being called.
- ArgumentNames
- String[]
参数名称的数组。An array of argument names.
- TypeArguments
- Type[]
参数类型的数组;只用于传递参数类型的泛型调用。An array of argument types; used only for generic calls to pass argument types.
适用于
LateSet(Object, Type, String, Object[], String[], Type[], Boolean, Boolean, CallType)
执行后期绑定属性设置或字段写入调用。Executes a late-bound property set or field write call. 此帮助器方法不宜从您的代码直接调用。This helper method is not meant to be called directly from your code.
public:
static void LateSet(System::Object ^ Instance, Type ^ Type, System::String ^ MemberName, cli::array <System::Object ^> ^ Arguments, cli::array <System::String ^> ^ ArgumentNames, cli::array <Type ^> ^ TypeArguments, bool OptimisticSet, bool RValueBase, Microsoft::VisualBasic::CallType CallType);
public static void LateSet (object Instance, Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, Type[] TypeArguments, bool OptimisticSet, bool RValueBase, Microsoft.VisualBasic.CallType CallType);
public static void LateSet (object? Instance, Type? Type, string MemberName, object?[]? Arguments, string?[]? ArgumentNames, Type[]? TypeArguments, bool OptimisticSet, bool RValueBase, Microsoft.VisualBasic.CallType CallType);
static member LateSet : obj * Type * string * obj[] * string[] * Type[] * bool * bool * Microsoft.VisualBasic.CallType -> unit
Public Shared Sub LateSet (Instance As Object, Type As Type, MemberName As String, Arguments As Object(), ArgumentNames As String(), TypeArguments As Type(), OptimisticSet As Boolean, RValueBase As Boolean, CallType As CallType)
参数
- Instance
- Object
公开属性或方法的调用对象的实例。An instance of the call object exposing the property or method.
- Type
- Type
调用对象的类型。The type of the call object.
- MemberName
- String
调用对象上的属性或方法的名称。The name of the property or method on the call object.
- Arguments
- Object[]
一个数组,包含要传递给正在被调用的属性或方法的参数。An array containing the arguments to be passed to the property or method being called.
- ArgumentNames
- String[]
参数名称的数组。An array of argument names.
- TypeArguments
- Type[]
参数类型的数组;只用于传递参数类型的泛型调用。An array of argument types; used only for generic calls to pass argument types.
- OptimisticSet
- Boolean
一个 Boolean 值,用于确定设置操作是否起作用。A Boolean value used to determine whether the set operation will work. 如果确定已经在属性或字段中设置了中间值,则设置为 True,否则设置为 False。Set to True when you believe that an intermediate value has been set in the property or field; otherwise False.
- RValueBase
- Boolean
一个 Boolean 值,该值指定后期引用的基引用何时为 RValue。A Boolean value that specifies when the base reference of the late reference is an RValue. 当后期引用的基引用为 True 时,则设置为 RValue;这允许您在后期赋值给值类型的 RValues 的字段时生成运行时异常。Set to True when the base reference of the late reference is an RValue; this allows you to generate a run-time exception for late assignments to fields of RValues of value types. 否则设置为 False。Otherwise, set to False.
- CallType
- CallType
类型 CallType 的一个枚举成员,它表示正在被调用的过程的类型。An enumeration member of type CallType representing the type of procedure being called. CallType 的值可以是 Method、Get 或 Set。The value of CallType can be Method, Get, or Set. 仅使用 Set。Only Set is used.
注解
如果设置操作是作为参数传递的后期绑定表达式的复制副本 ByRef , OptimisticSet 则使用来确定设置操作是否有效,因为后期绑定表达式可能会生成只读属性或方法。If the set operation is the copy-back of a late-bound expression being passed as a ByRef parameter, OptimisticSet is used to determine whether the set operation will work, as the latebound expression may result in a read-only property or a method. 有关详细信息,请参阅的 CopyBack 参数 LateCall 。For more information see the CopyBack parameter of LateCall.