PropertyBuilder.GetValue 메서드

정의

getter를 호출하여 속성 값을 가져옵니다.

오버로드

GetValue(Object, Object[])

속성의 getter 메서드를 호출하여 인덱싱된 속성의 값을 가져옵니다.

GetValue(Object, BindingFlags, Binder, Object[], CultureInfo)

지정된 바인딩, 인덱스 및 CultureInfo가 있는 속성의 값을 가져옵니다.

GetValue(Object, Object[])

Source:
PropertyBuilder.cs

속성의 getter 메서드를 호출하여 인덱싱된 속성의 값을 가져옵니다.

public:
 override System::Object ^ GetValue(System::Object ^ obj, cli::array <System::Object ^> ^ index);
public override object GetValue (object? obj, object?[]? index);
public override object GetValue (object obj, object[] index);
override this.GetValue : obj * obj[] -> obj
Public Overrides Function GetValue (obj As Object, index As Object()) As Object

매개 변수

obj
Object

속성 값이 반환될 개체입니다.

index
Object[]

인덱싱된 속성에 대한 선택적 인덱스 값입니다. 인덱싱되지 않은 속성에 대해서는 이 값이 null이어야 합니다.

반환

지정된 인덱싱된 속성의 값입니다.

예외

이 메서드는 지원되지 않습니다.

설명

속성 값을 얻으려면 Type.GetType 또는 Assembly.GetType을 사용하여 속성의 부모 형식을 반영하고, 형식에서 속성 개체를 검색 Reflection 하고, 를 호출 PropertyInfo.GetValue합니다.

적용 대상

GetValue(Object, BindingFlags, Binder, Object[], CultureInfo)

Source:
PropertyBuilder.cs

지정된 바인딩, 인덱스 및 CultureInfo가 있는 속성의 값을 가져옵니다.

public:
 override System::Object ^ GetValue(System::Object ^ obj, System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, cli::array <System::Object ^> ^ index, System::Globalization::CultureInfo ^ culture);
public override object GetValue (object? obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder? binder, object?[]? index, System.Globalization.CultureInfo? culture);
public override object GetValue (object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture);
override this.GetValue : obj * System.Reflection.BindingFlags * System.Reflection.Binder * obj[] * System.Globalization.CultureInfo -> obj
Public Overrides Function GetValue (obj As Object, invokeAttr As BindingFlags, binder As Binder, index As Object(), culture As CultureInfo) As Object

매개 변수

obj
Object

속성 값이 반환될 개체입니다.

invokeAttr
BindingFlags

호출 특성입니다. 이것은 BindingFlags, InvokeMethod, CreateInstance, Static, GetField, SetField 또는 GetProperty 등과 같은 SetProperty의 비트 플래그여야 합니다. 적합한 호출 특성을 지정해야 합니다. 정적 멤버를 호출하려는 경우 StaticBindingFlags 플래그를 설정해야 합니다.

binder
Binder

리플렉션을 통해 바인딩, 인수 형식의 강제 변환, 멤버 호출 및 MemberInfo 개체의 검색을 가능하게 하는 개체입니다. bindernull이면 기본 바인더가 사용됩니다.

index
Object[]

인덱싱된 속성에 대한 선택적 인덱스 값입니다. 인덱싱되지 않은 속성에 대해서는 이 값이 null이어야 합니다.

culture
CultureInfo

리소스를 지역화할 문화권을 나타내는 CultureInfo 개체입니다. 리소스가 이 문화권에 대해 지역화되지 않으면 CultureInfo.Parent 메서드가 연속적으로 호출되어 일치하는 문화권 정보를 검색합니다. 이 값이 null이면 CultureInfo 속성에서 CultureInfo.CurrentUICulture를 가져옵니다.

반환

obj의 속성 값을 반환합니다.

예외

이 메서드는 지원되지 않습니다.

설명

속성 값을 얻으려면 Type.GetType 또는 Assembly.GetType을 사용하여 속성의 부모 형식을 반영하고, 형식에서 Reflection 속성 개체를 검색하고, PropertyInfo.GetValue를 호출합니다.

적용 대상