This topic has not yet been rated - Rate this topic

PropertyBuilder.GetValue Method (Object, BindingFlags, Binder, Object[], CultureInfo)

Gets the value of a property that has the specified binding, index, and CultureInfo. This method is not supported.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)
public override Object GetValue(
	Object obj,
	BindingFlags invokeAttr,
	Binder binder,
	Object[] index,
	CultureInfo culture
)

Parameters

obj
Type: System.Object
The object whose property value will be returned.
invokeAttr
Type: System.Reflection.BindingFlags
The invocation attribute. This must be a bit flag from BindingFlags: InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, or SetProperty. A suitable invocation attribute must be specified. If a static member is to be invoked, the Static flag of BindingFlags must be set.
binder
Type: System.Reflection.Binder
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects using reflection. If binder is null, the default binder is used.
index
Type: System.Object[]
Optional index values for indexed properties. This value should be null for non-indexed properties.
culture
Type: System.Globalization.CultureInfo
The CultureInfo object that represents the culture for which the resource is to be localized. Note that if the resource is not localized for this culture, the CultureInfo.Parent method will be called successively in search of a match. If this value is null, the CultureInfo is obtained from the CultureInfo.CurrentUICulture property.

Return Value

Type: System.Object
The property value for obj.
ExceptionCondition
NotSupportedException

This method is not supported.

To get the value of a property, reflect on the property's parent type after the type is completed, using Type.GetType or Assembly.GetType. Retrieve the PropertyInfo object from the type, and call PropertyInfo.GetValue.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.