- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
System.Reflection namespace in C#
System.Reflection namespace in C# The System.Reflection namespace in C# contains the types that provide information about assemblies, modules, members, parameters, and other items in the code by examining the metadata. The Assembly class in this namespace represents an assembly. Typically, you can access it using the Assembly property on a Type.
An assembly's identity consists of four items −
- Simple name
- Version from the AssemblyVersion attribute in the major.minor.build.revision format (0.0.0.0 if absent)
- Culture (neutral if not a satellite)
- Public key token (null if not strongly named)
A fuller qualified assembly name is a string, and it includes these identifying items in the format −
simple-name, Version=version, Culture=culture, PublicKeyToken=public-key
For example,
Assembly assembly = typeof (Person).Assembly; // Person is a class name // Prints: c-sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Console.WriteLine(assembly.FullName);
Assembly Loading is the process of loading an assembly from a known location. Typically, the CLR can load the assembly using its full name. This process is called assembly resolution. Assembly resolution is performed when the CLR needs to resolve a dependency or you, as a programmer, want to load an assembly dynamically, using the Assembly.Load(assemblyName) method.