What is Reflection in C#.Net?
What is Reflection in C#.Net?
Reflection in C# is a powerful feature that allows a program to inspect and manipulate its own metadata at runtime. It provides a way to dynamically access information about types, methods, fields, and properties, and even create new types or invoke methods at runtime[1][2][3].
The key aspects of C# reflection are:
System.Reflection
namespace which contains classes like Assembly
, Type
, MethodInfo
, FieldInfo
, PropertyInfo
, etc. to access metadata[1][2][3]Type
class is the primary way to access metadata. It provides methods and properties to get information about a type declaration[3]Some common use cases of reflection in C# include:
middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào