MarshalAsAttribute.MarshalType 字段

定义

指定自定义封送处理程序的完全限定名。Specifies the fully qualified name of a custom marshaler.

public: System::String ^ MarshalType;
[System.Runtime.InteropServices.ComVisible(true)]
public string MarshalType;
val mutable MarshalType : string
Public MarshalType As String 

字段值

属性

注解

您可以使用MarshalTypeMarshalAsAttribute.MarshalTypeRef字段指定属性化参数、字段或返回类型的自定义封送拆收器类型。You can use either the MarshalType or MarshalAsAttribute.MarshalTypeRef field specify a custom marshaler type for the attributed parameter, field, or return type. 利用MarshalType字段, 您可以指定一个表示自定义封送拆收器的完全限定名称的字符串。The MarshalType field enables you to specify a string representing the fully qualified name of a custom marshaler. 它对于后期绑定引用非常有用, 但它比MarshalTypeRef指定自定义封送拆收器更少。It is useful for late-bound references, but is less preferred than MarshalTypeRef for specifying a custom marshaler. 有关创建和使用自定义封送拆收器的其他信息, 请参阅自定义封送For additional information about creating and using custom marshalers, see Custom Marshaling.

适用于

另请参阅