Метод | Описание | |
---|---|---|
ChangeType ( this obj, |
Use this instead of Convert.ChangeType to support Nullable<> types. Returns an Object with the specified Type of which the value is equivalent to the specified object.
|
|
CopyMatchingObjectPropertiesTo ( this source, object dest, bool shallow = false ) : void |
Copies value type properties with matching names and compatible types from the current instance to the specified destination, even if the source and destination are not in the same inheritance family. Incompatible and missing properties are ignored. If both the source and the destination have a complex property, the method will recurse if shallow is false.
|
|
GetPropertiesWithAttribute ( this obj, |
||
GetPropertyValue ( this obj, string propertyName ) : object |
Gets the value of a property of a given object.
|
|
IsNullableType ( this obj ) : bool |
Determines if the given object is Nullable<>.
|
|
SetPropertyValue ( this obj, string propertyName, object propertyValue ) : void |
Sets value of a property of a given object.
|
|
SetPropertyValues ( this obj, |
Sets value of multiple properties of a given object.
|
Метод | Описание | |
---|---|---|
GetMethodsWithAttribute ( this obj, |
public static ChangeType ( this obj, |
||
obj | this | Specifies the object for which the type should change. |
toType | Specifies the type to change the specified object to. | |
Результат | object |
public static CopyMatchingObjectPropertiesTo ( this source, object dest, bool shallow = false ) : void | ||
source | this | Specifies the source object to copy from. |
dest | object | Specifies the destination object to copy to. |
shallow | bool | Specifies if the copy should be shallow. |
Результат | void |
public static GetPropertiesWithAttribute ( this obj, |
||
obj | this | |
attributeType | ||
inherit | bool | |
Результат | System.Reflection.PropertyInfo[] |
public static GetPropertyValue ( this obj, string propertyName ) : object | ||
obj | this | Specifies the object from which to retrieve the property value. |
propertyName | string | Specifies the name of the property to be returned. This /// value can be specified using "dot syntax", e.g. "FirstProperty.SecondProperty". |
Результат | object |
public static IsNullableType ( this obj ) : bool | ||
obj | this | Specifies the object instance. |
Результат | bool |
public static SetPropertyValue ( this obj, string propertyName, object propertyValue ) : void | ||
obj | this | Specifies the object on which to act. |
propertyName | string | Specifies the name of the property to be changed. This value /// can be specified using "dot syntax", e.g. "FirstProperty.SecondProperty". |
propertyValue | object | Specifies the new value of the property. |
Результат | void |
public static SetPropertyValues ( this obj, |
||
obj | this | Specifies the object on which to act. |
propertyValues | Specifies the names and values of the properties to set. | |
Результат | void |