ScriptObject.GetProperty 方法

定義

取得具有指定之名稱的屬性。

多載

GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

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

藉由使用指定的選取準則,取得具有指定之名稱的屬性。

GetProperty(String, BindingFlags)

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

取得具有指定之名稱的屬性。

GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

藉由使用指定的選取準則,取得具有指定之名稱的屬性。

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

public:
 virtual System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
override this.GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

參數

name
String

要搜尋的屬性名稱。

bindingAttr
BindingFlags

列舉值的位元組合,指定透過反映處理搜尋成員的方式。

binder
Binder

將型別從實質引數型別轉換成型式引數型別的物件。

returnType
Type

屬性必須具有之傳回值的型別。

types
Type[]

要被搜尋的索引屬性型別。 用於索引屬性,例如類別的索引子。

modifiers
ParameterModifier[]

參數修飾詞的陣列,啟用繫結以使用型別已被修改的參數簽章。

傳回

具有指定之 name 的屬性,如果指令碼物件不包含屬性則為 null。

實作

另請參閱

適用於

GetProperty(String, BindingFlags)

取得具有指定之名稱的屬性。

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

public:
 virtual System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
override this.GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo

參數

name
String

要取得的屬性名稱。

bindingAttr
BindingFlags

列舉值的位元組合,指定透過反映處理搜尋成員的方式。

傳回

具有指定之 name 的屬性,如果指令碼物件不包含屬性則為 null。

實作

另請參閱

適用於