TypeBuilder.DefinePropertyCore 方法

定義

在衍生類別中覆寫時,使用指定的名稱、呼叫慣例、屬性簽章和自訂修飾詞,將新的屬性新增至類型。

protected:
 abstract System::Reflection::Emit::PropertyBuilder ^ DefinePropertyCore(System::String ^ name, System::Reflection::PropertyAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ returnTypeRequiredCustomModifiers, cli::array <Type ^> ^ returnTypeOptionalCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ parameterTypeRequiredCustomModifiers, cli::array <cli::array <Type ^> ^> ^ parameterTypeOptionalCustomModifiers);
protected abstract System.Reflection.Emit.PropertyBuilder DefinePropertyCore (string name, System.Reflection.PropertyAttributes attributes, System.Reflection.CallingConventions callingConvention, Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers);
abstract member DefinePropertyCore : string * System.Reflection.PropertyAttributes * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.PropertyBuilder
Protected MustOverride Function DefinePropertyCore (name As String, attributes As PropertyAttributes, callingConvention As CallingConventions, returnType As Type, returnTypeRequiredCustomModifiers As Type(), returnTypeOptionalCustomModifiers As Type(), parameterTypes As Type(), parameterTypeRequiredCustomModifiers As Type()(), parameterTypeOptionalCustomModifiers As Type()()) As PropertyBuilder

參數

name
String

屬性的名稱。 name 不能包含內嵌的 null。

attributes
PropertyAttributes

列舉值的位元組合,指定 屬性的屬性。

callingConvention
CallingConventions

屬性存取子的呼叫慣例。

returnType
Type

屬性的傳回類型。

returnTypeRequiredCustomModifiers
Type[]

型別陣列,表示必要的自訂修飾詞

returnTypeOptionalCustomModifiers
Type[]

型別陣列,表示選擇性自訂修飾詞

parameterTypes
Type[]

方法參數的類型。

parameterTypeRequiredCustomModifiers
Type[][]

類型陣列的陣列。 每個類型的陣列都代表對應參數的必要自訂修飾詞。

parameterTypeOptionalCustomModifiers
Type[][]

類型陣列的陣列。 每一個型別陣列都表示對應參數的選擇性自訂修飾詞。

傳回

定義的屬性。

適用於