ParameterBuilder.SetMarshal(UnmanagedMarshal) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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
此參數的編組資訊。
- 屬性
例外狀況
unmanagedMarshal 是 null。
備註
此方法應拋出以下例外,但目前尚未執行:
InvalidOperationException 如果所包含的型別是使用 TypeBuilder.CreateType() 建立的。