CSharp examples for System.Reflection:Assembly
Get Accessible Properties
using System.Text; using System.Reflection; using System.Collections.Generic; using System.Collections; using System;//w w w . ja va 2s . c om public class Main{ private static PropertyInfo[] GetAccessibleProperties(Type clazz) { ArrayList props = new ArrayList(); foreach(Type iface in clazz.GetInterfaces()) { props.AddRange(iface.GetProperties()); } props.AddRange(clazz.GetProperties()); return (PropertyInfo[]) props.ToArray(typeof(PropertyInfo)); } }