Given the follwing class - I would like to know which of the both members is abstract:
abstract class Test
{
public abstract bool Abstract { get; set; }
public bool NonAbstract { get; set; }
}
var type = typeof( Test );
var abs = type.GetProperty( "Abstract" );
var nonAbs = type.GetProperty( "NonAbstract" );
// now, something like:
if( abs.IsAbstract ) ...
Unfortunately there is nothing like the IsAbstract
-property.
I need to select all non-abstract fields/properties/methods of a class - but there are no BindingFlags
to narrow the selection, too.