Assembly information can be accessed through the Assembly class in C#.
1. Allow access to meta-elements of a given assembly, including methods that can load and execute the assembly;
2. Loading the assembly: Use static methods (assembly name) or (assembly full path name);
3. Attributes:
FullName: Assembly display name;
3. Method:
GetTypes(): Gets the type defined in the assembly.
:
view plaincopy to clipboardprint?
using System; using ;
namespace
{ public class TestAssembly
{ public static void Main()
{ //Load the assembly into the run process
Assembly ass = ("TestCustomAttributes");
Assembly ass1 = (@"E:\CODE\dotNet\C#\9-Reflection\");
//Get the assembly display name
();
//Get the type defined in the assembly
Type[] types = ();
foreach (Type t in types)
{ ();
} } } }
1. Allow access to meta-elements of a given assembly, including methods that can load and execute the assembly;
2. Loading the assembly: Use static methods (assembly name) or (assembly full path name);
3. Attributes:
FullName: Assembly display name;
3. Method:
GetTypes(): Gets the type defined in the assembly.
:
view plaincopy to clipboardprint?
using System; using ;
namespace
{ public class TestAssembly
{ public static void Main()
{ //Load the assembly into the run process
Assembly ass = ("TestCustomAttributes");
Assembly ass1 = (@"E:\CODE\dotNet\C#\9-Reflection\");
//Get the assembly display name
();
//Get the type defined in the assembly
Type[] types = ();
foreach (Type t in types)
{ ();
} } } }