Mega Code Archive

 
Categories / C# / Reflection
 

Gets a MemberTypes value indicating that this member is a property

using System; using System.Reflection; class Mypropertyinfo {     public static int Main()     {         Type MyType = Type.GetType("System.Reflection.MemberInfo");         PropertyInfo Mypropertyinfo = MyType.GetProperty("Name");         Console.Write("\nMemberType = " + Mypropertyinfo.MemberType.ToString());         return 0;     } }