Jie Zhu
Thursday, November 12, 2009
Reflection Related-Use BindingFlags to retrieve memebers
Type t = typeof(Console);
MemberInfo[] mi = t.GetMembers(
BindingFlags.NonPublic | BindingFlags.Static);
foreach (MemberInfo m in mi)
{
Console.WriteLine("{0}: {1}", m.Name, m.MemberType);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment