Method GetValue
- Namespace
- Alternet.TsTypedefsGenerator.Core.TsModels
- Assembly
- Alternet.Common.TypeScript.v9.dll
GetValue(object, BindingFlags, Binder, object[], CultureInfo)
When overridden in a derived class, returns the property value of a specified object that has the specified binding, index, and culture-specific information.
public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
Parameters
obj
objectThe object whose property value will be returned.
invokeAttr
BindingFlagsA bitwise combination of the following enumeration members that specify the invocation attribute: InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, and SetProperty. You must specify a suitable invocation attribute. For example, to invoke a static member, set the Static flag.
binder
BinderAn object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects through reflection. If
binder
is null, the default binder is used.index
object[]Optional index values for indexed properties. This value should be null for non-indexed properties.
culture
CultureInfoThe culture for which the resource is to be localized. If the resource is not localized for this culture, the Parent property will be called successively in search of a match. If this value is null, the culture-specific information is obtained from the CurrentUICulture property.
Returns
- object
The property value of the specified object.
Exceptions
- ArgumentException
The
index
array does not contain the type of arguments needed.-or- The property's get accessor is not found.- TargetException
The object does not match the target type, or a property is an instance property but
obj
is null.- TargetParameterCountException
The number of parameters in
index
does not match the number of parameters the indexed property takes.- MethodAccessException
There was an illegal attempt to access a private or protected method inside a class.
- TargetInvocationException
An error occurred while retrieving the property value. For example, an index value specified for an indexed property is out of range. The InnerException property indicates the reason for the error.