Mega Code Archive

 
Categories / C# / Reflection
 

Returns the public or non-public get accessor for this property

using System; using System.Reflection; class Mypropertyinfo {     public static int Main()     {         Type MyTypeb = Type.GetType("System.Reflection.MethodInfo");         PropertyInfo Mypropertyinfob = MyTypeb.GetProperty("MemberType");         MethodInfo Mygetmethodinfob = Mypropertyinfob.GetGetMethod();         Console.Write (Mygetmethodinfob.ReturnType);         return 0;     } }