MarshalAsAttribute.MarshalType 字段

定义

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

public: System::String ^ MarshalType;
public 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.

适用于

另请参阅