Skip to main content

TypeExtensions

A static class in Alta.Attributes, the global namespace.

Reflection helpers that look up fields and methods on a type and all its base types, so private members of base classes are found too.

Methods​

MemberWhat it is
static FieldInfo GetFieldIncludingBase(Type type, string name, BindingFlags flags)Returns the first field with the name found walking up from the type through its base types, or null.
static IEnumerable<FieldInfo> GetFieldsIncludingBase(Type type, BindingFlags flags) (iterator)Yields the fields matching the flags on the type and each of its base types.
static MethodInfo GetMethodIncludingBase(Type type, string name, BindingFlags flags)Returns the first method with the name found walking up from the type through its base types, or null.
static IEnumerable<MethodInfo> GetMethodsIncludingBase(Type type, BindingFlags flags) (iterator)Yields the methods matching the flags on the type and each of its base types.