Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var properties = TypeDescriptor.GetProperties(typeof(ISuperHero))
.Concat(typeof(ISuperHero).GetInterfaces().SelectMany(x => TypeDescriptor.GetProperties(x).OfType<PropertyDescriptor>()));
foreach (PropertyDescriptor property in properties)
// reflection
var reflectedProperties = typeof(ISuperHero).GetProperties()
.Concat(typeof(ISuperHero).GetInterfaces().SelectMany(x => x.GetProperties()));
foreach (var property in reflectedProperties)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.