MethodCodeType 列舉

定義

定義如何實作方法。

此列舉支援其成員值的位元組合。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public enum class MethodCodeType
[System.Flags]
[System.Serializable]
public enum MethodCodeType
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum MethodCodeType
public enum MethodCodeType
[<System.Flags>]
[<System.Serializable>]
type MethodCodeType = 
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type MethodCodeType = 
type MethodCodeType = 
Public Enum MethodCodeType
繼承
MethodCodeType
屬性

欄位

名稱 Description
IL 0

規定方法實作為 Microsoft 中介語言(MSIL)。

Native 1

指定該方法必須以原生程式碼實作。

OPTIL 2

規定方法實作為優化中介語言(OPTIL)。

Runtime 3

指定方法實作由執行時提供。

備註

MethodImplAttribute 搭配使用。

System.Runtime.CompilerServices 中的類別僅供編譯器撰寫者使用。

適用於