Sets the value of the property with optional index values for index properties.
[Visual Basic] Overloads Overridable Public Sub SetValue( _ ByVal obj As Object, _ ByVal value As Object, _ ByVal index() As Object _ ) [C#] public virtual void SetValue( object obj, object value, object[] index ); [C++] public: virtual void SetValue( Object* obj, Object* value, Object* index[] ); [JScript] public function SetValue( obj : Object, value : Object, index : Object[] );
Exception Type | Condition |
---|---|
ArgumentException | the index array doesn't contain the exact number and type of arguments needed. |
This method is a convenience method that calls the following SetValue method with a BinderFlags parameter of DefaultChangeType, the Binder set to null, and the CultureInfo set to null. Note that the following method is abstract and must be implemented before this method is functional.
To use the SetValue method, first get the class Type. From the Type, get the PropertyInfo. From the PropertyInfo, use the SetValue method.
PropertyInfo Class | PropertyInfo Members | System.Reflection Namespace | PropertyInfo.SetValue Overload List