/// <summary> /// Gets the field identified by <paramref name="name"/> on the given <paramref name="type"/>. /// Use the <paramref name="bindingFlags"/> parameter to define the scope of the search. /// </summary> /// <returns>A single FieldInfo instance of the first found match or null if no match was found.</returns> public static FieldInfo Field(this Type type, string name, FasterflectFlags bindingFlags) { return(ReflectLookup.Field(type, name, bindingFlags)); }
/// <summary> /// Gets the field identified by <paramref name="name"/> on the given <paramref name="type"/>. This method /// searches for public and non-public instance fields on both the type itself and all parent classes. /// </summary> /// <returns>A single FieldInfo instance of the first found match or null if no match was found.</returns> public static FieldInfo Field(this Type type, string name) { return(ReflectLookup.Field(type, name)); }