MarshalAsAttribute.Value 属性

定义

获取 UnmanagedType 值,数据将被作为该值封送。Gets the UnmanagedType value the data is to be marshaled as.

public:
 property System::Runtime::InteropServices::UnmanagedType Value { System::Runtime::InteropServices::UnmanagedType get(); };
public System.Runtime.InteropServices.UnmanagedType Value { get; }
member this.Value : System.Runtime.InteropServices.UnmanagedType
Public ReadOnly Property Value As UnmanagedType

属性值

UnmanagedType 值,数据将被作为该值封送。The UnmanagedType value the data is to be marshaled as.

注解

此值用于MarshalAsAttribute指示如何在托管代码和非托管代码之间封送类型。This value is used with MarshalAsAttribute to indicate how types should be marshaled between managed and unmanaged code. 在某些情况下, 可以将此字段与某些UnmanagedType枚举成员一起使用。In some cases, you can use this field with certain UnmanagedType enumeration members. 对于CustomMarshalerByValArray, 必须使用其他命名参数。For CustomMarshaler and ByValArray, you must use additional named parameters.

适用于