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() 建立的。

適用於