通过


MarshalAsAttribute.MarshalType 字段

定义

指定自定义封送处理程序的完全限定名称。

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

字段值

属性

注解

可以使用 MarshalTypeMarshalAsAttribute.MarshalTypeRef 字段为特性化参数、字段或返回类型指定自定义封送器类型。 通过 MarshalType 此字段,可以指定表示自定义封送器完全限定名称的字符串。 它对于后期绑定引用很有用,但比 MarshalTypeRef 指定自定义封送处理器更优先。

适用于

另请参阅