Version 2.1.0.0

FieldInfoExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class FieldInfoExtensions
FieldInfo method extensions.
Inheritance
  • System.Object
  • FieldInfoExtensions

Methods

DeAliasField(FieldInfo, Boolean)
Returns the original, backing field of an alias field if the field is an alias.
public static FieldInfo DeAliasField(this FieldInfo fieldInfo, bool throwOnNotAliased = false)
Parameters
System.Reflection.FieldInfo fieldInfo

The field to check.

System.Boolean throwOnNotAliased

if set to true an exception will be thrown if the field is not aliased.

Returns
System.Reflection.FieldInfo

Exceptions
System.ArgumentException

The field was not aliased; this only occurs if throwOnNotAliased is true.

IsAliasField(FieldInfo)
Determines whether the specified field is an alias.
public static bool IsAliasField(this FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

The field to check.

Returns
System.Boolean

true if the specified field is an alias; otherwise, false.