< p> using System.Reflection ;
< p> espacio de nombres reflexión
< p > {
< p> clase reflexión
< p > {
< p> public static void Main ()
< p > {
< p> Escriba t = typeof ( reflec ) ;
< p> tipo T1 = typeof ( seg ) ;
< p> MemberInfo [ ] b = t.GetMembers ( ) ;
< p> MemberInfo [ ] c = t1.GetMembers ();
< p> foreach ( MemberInfo a en b )
< p > {
< p> Console.WriteLine ( a.ReflectedType + " " + a.DeclaringType + " " + a.Name + " =" + a .
MemberType ) ;
< p >}
< p> foreach ( MemberInfo a en c )
< p > {
< p> Console.WriteLine ( a.ReflectedType + " " + a.DeclaringType + "" + a.Name + " =" + a.MemberType ) ;
< p >}
< p> Console.ReadLine ();
< p >}
< p >} < br > < p> clase reflec
< p > {
< p> public void del ( ) { }
< p> public void bienvenidos ( ) { }
< p >}
< p> clase sec:
los refle
{
< p> public int a = 5 ;
< p> seg público ( int a) {}
< p> public void cosec () {}
< p >}
< p >}