ReflectionWays Enumeration

Represents the possible ways of reflection for the methods of the Reflector class.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public enum ReflectionWays

Members

Auto0 Auto decision. In most cases it uses the DynamicDelegate way.
DynamicDelegate1 Dynamic delegate way. This option uses cached MemberAccessor instances for reflection. In this case first access of a member is slower than accessing it via system reflection but further accesses are much more faster.
SystemReflection2 Uses the standard system reflection way.
TypeDescriptor3 Uses the type descriptor way. If there is no ICustomTypeDescriptor implementation for an instance, then this can be the slowest way as it internally falls back to use system reflection. Not applicable in all cases.

See Also