ParameterBuilder.SetMarshal(UnmanagedMarshal) 方法

定义

注意

An alternate API is available: Emit the MarshalAs custom attribute instead. http://go.microsoft.com/fwlink/?linkid=14202

为该参数指定封送处理。

public:
 virtual void SetMarshal(System::Reflection::Emit::UnmanagedMarshal ^ unmanagedMarshal);
public virtual void SetMarshal (System.Reflection.Emit.UnmanagedMarshal unmanagedMarshal);
[System.Obsolete("An alternate API is available: Emit the MarshalAs custom attribute instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public virtual void SetMarshal (System.Reflection.Emit.UnmanagedMarshal unmanagedMarshal);
abstract member SetMarshal : System.Reflection.Emit.UnmanagedMarshal -> unit
override this.SetMarshal : System.Reflection.Emit.UnmanagedMarshal -> unit
[<System.Obsolete("An alternate API is available: Emit the MarshalAs custom attribute instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
abstract member SetMarshal : System.Reflection.Emit.UnmanagedMarshal -> unit
override this.SetMarshal : System.Reflection.Emit.UnmanagedMarshal -> unit
Public Overridable Sub SetMarshal (unmanagedMarshal As UnmanagedMarshal)

参数

unmanagedMarshal
UnmanagedMarshal

此参数的封送处理信息。

属性

例外

unmanagedMarshalnull

注解

此方法应引发以下异常,但当前不会:

InvalidOperationException 如果已使用 TypeBuilder.CreateType () 创建包含的类型,则为 。

适用于