FieldOrPropertyInfo¶
Namespace:
SideXP.Core.Reflection| Inherits from:MemberInfo
Groups informations about a field or a property queried using C# reflection.
Constructors¶
FieldOrPropertyInfo(MemberInfo)¶
Groups informations about a field or a property queried using C# reflection.
Parameters
memberInfo: The field or property to represent.
Properties¶
FieldInfo¶
Informations about the field. Null if the element is a property (see Property).
PropertyInfo¶
Informations about the property. Null if the element is a field (see Field).
Name¶
Inherited documentation.
DeclaringType¶
Inherited documentation.
MemberType¶
Inherited documentation.
ReflectedType¶
Inherited documentation.
Type¶
Gets the type of the represented field or property.
IsField¶
Checks if this object represents a field.
IsProperty¶
Checks if this object represents a property.
IsValid¶
Checks if a valid member has been assigned to this object.
CanRead¶
Checks if the value of the element can be read.
CanWrite¶
Checks if the value of the element can be set.
IsPublic¶
Checks if a given member (field or property) is public.
Returns
Returns true if the given member is public.
Remarks
A property is considered public if one of its accessors is marked as public.
IsPrivate¶
Checks if a given member (field or property) is private.
Returns
Returns true if the given member is private.
Remarks
A property is considered private if its accessors are both marked as private.
Methods¶
GetCustomAttributes(bool)¶
Inherited documentation.
GetCustomAttributes(Type, bool)¶
Inherited documentation.
IsDefined(Type, bool)¶
Inherited documentation.
GetValue(object)¶
Gets the value of this field or property.
Parameters
target: The object that owns the field or property to read.
Returns
Returns the value of the field or property.
GetValue<T>(object)¶
Gets the value of this field or property.
Type parameters
T: The expected type of the value.
Parameters
target: The object that owns the field or property to read.
Returns
Returns the value of the field or property.
SetValue(object, object)¶
Sets the value of this field or property.
Parameters
target: The object that owns the field or property to set.value: The value you want to set for the field or property.