Class PropertyInfoExtensions
Various extensions for objects of type PropertyInfo.
Inherited Members
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class PropertyInfoExtensions
Methods
| Edit this page View SourceIsReadWrite(PropertyInfo)
Gets a value indicating whether the property supports read and write.
Declaration
public static bool IsReadWrite(this PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfo | property | The property to check. |
Returns
Type | Description |
---|---|
bool | true if the property supports read and write; otherwise, false. |
SetDefault(PropertyInfo)
Sets the value of a static property to its default value.
Declaration
public static void SetDefault(this PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfo | property | The property to reset. |
SetDefault(PropertyInfo, object?)
Sets the value of a property on an object to its default value.
Declaration
public static void SetDefault(this PropertyInfo property, object? instance)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfo | property | The property to reset. |
object | instance | The instance of the object containing the property. |