ScriptObject.GetProperty 方法

定義

取得一個有指定名稱的屬性。

多載

名稱 Description
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屬性的屬性;若腳本物件不包含該屬性,則為空屬性。

實作

另請參閱

適用於

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屬性的屬性;若腳本物件不包含該屬性,則為空屬性。

實作

另請參閱

適用於