Posts

Showing posts with the label C# | Reflection

C# | Reflection

In C#, reflection is a  process to get metadata of a type at runtime . The System.Reflection namespace contains required classes for reflection such as: Type MemberInfo ConstructorInfo MethodInfo FieldInfo PropertyInfo TypeInfo EventInfo Module Assembly AssemblyName Pointer etc. C# Type class C# Type class represents type declarations for class types, interface types, enumeration types, array types, value types etc. It is found in System namespace. It inherits System.Reflection.MemberInfo class. C# Type Properties A list of important properties of Type class are given below: Property Description Assembly Gets the Assembly for this type. AssemblyQualifiedName Gets the Assembly qualified name for this type. Attributes Gets the Attributes associated with the type. BaseType Gets the base or parent type. FullName Gets the fully qualified name of the type. IsAbstract is used to check if the type is Abstract. IsArray is used to check if the type is Array. IsClass is used to check if the t...