共用方式為


ParameterBuilder.SetMarshal(UnmanagedMarshal) 方法

定義

警告

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

指定這個參數的封送處理 (Marshaling)。

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 () 建立包含的類型,則為 。

適用於