DataBinder.GetPropertyValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the value of a property.
Overloads
GetPropertyValue(Object, String) |
Retrieves the value of the specified property of the specified object. |
GetPropertyValue(Object, String, String) |
Retrieves the value of the specified property of the specified object, and then formats the results. |
GetPropertyValue(Object, String)
Retrieves the value of the specified property of the specified object.
public:
static System::Object ^ GetPropertyValue(System::Object ^ container, System::String ^ propName);
public static object GetPropertyValue (object container, string propName);
static member GetPropertyValue : obj * string -> obj
Public Shared Function GetPropertyValue (container As Object, propName As String) As Object
Parameters
- container
- Object
The object that contains the property.
- propName
- String
The name of the property that contains the value to retrieve.
Returns
The value of the specified property.
Exceptions
The object in container
does not have the property specified by propName
.
Examples
The example for DataBinder demonstrates the use of this method.
Remarks
The GetPropertyValue method is used to retrieve the value of a property in an object.
Applies to
GetPropertyValue(Object, String, String)
Retrieves the value of the specified property of the specified object, and then formats the results.
public:
static System::String ^ GetPropertyValue(System::Object ^ container, System::String ^ propName, System::String ^ format);
public static string GetPropertyValue (object container, string propName, string format);
static member GetPropertyValue : obj * string * string -> string
Public Shared Function GetPropertyValue (container As Object, propName As String, format As String) As String
Parameters
- container
- Object
The object that contains the property.
- propName
- String
The name of the property that contains the value to retrieve.
- format
- String
A string that specifies the format in which to display the results.
Returns
The value of the specified property in the format specified by format
.
Exceptions
The object in container
does not have the property specified by propName
.
Examples
The example for DataBinder demonstrates the use of this method.
Remarks
This version of the GetPropertyValue method is used to retrieve and format the value of a property in an object.