I'm reflecting on an object and only want the public properties of an instance, I don't want public static properties. The problem is GetProperties() returns both static and instance public properties. Anyone have an idea how to best approach this problem?
private IOrderedEnumerable<PropertyInfo> GetSortedPropInfos()
{
return dataExtractor.GetType().GetProperties().OrderBy(
p => p.Name );
}
Note, I sort the list since GetProperties() does not specify any type of ordering, and ordering is important to me.