Partager via


PropertyInfo.GetValue Method

Retrieves the value of a property for a specified object. For indexed properties, the GetValue property also retrieves optional index values.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

Syntax

[DebuggerStepThroughAttribute]
[DebuggerHiddenAttribute]
[MethodImplAttribute]
public virtual Object GetValue (
         Objectobj,
         Object[] index
)

Parameters

  • obj
    The object whose property value will be returned.
  • index
    Optional index values for indexed properties. For nonindexed properties, this value should be a null reference.

Return Value

The property value for the object specified by the obj parameter.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

PropertyInfo Class
PropertyInfo Members
System.Reflection Namespace