Reflection in c#
Reflection is a process by which an application can read and collect data from assemby and metadata.
Reflection.cs
===
using System;
using System.Reflection;
class zzz
{
public static void Main()
{
Type m;
m = typeof(int);
System.Console.WriteLine(m.Name + ” ” + m.FullName);
m = typeof(System.Int32);
System.Console.WriteLine(m.Name + ” ” + m.FullName);
m = typeof(yyy);
System.Console.WriteLine(m.Name + ” ” + m.FullName);
m=typeof(string);
MemberInfo [] n;
n = m.GetMembers();
Console.WriteLine(n.Length);
foreach ( MemberInfo a in n)
{
Console.Write(a.Name+”,”);
}
System.Console.WriteLine(m.Name + ” ” + m.FullName);
}
}
class yyy
{
}
===