public int PropertyInA {get;set;}
public int PropertyInB {get;set;}
public int PropertyInC {get;set;}
public static void Main()
var props = myObject.GetType().GetProperties(System.Reflection.BindingFlags.Public
| System.Reflection.BindingFlags.Instance
| System.Reflection.BindingFlags.DeclaredOnly);
Console.WriteLine("Only declared in C:");
Console.WriteLine(string.Join(", ", props.Select(x => x.Name)));
props = myObject.GetType().BaseType.GetProperties(System.Reflection.BindingFlags.Public
| System.Reflection.BindingFlags.Instance
| System.Reflection.BindingFlags.DeclaredOnly);
Console.WriteLine(Environment.NewLine + "Only declared in B:");
Console.WriteLine(string.Join(", ", props.Select(x => x.Name)));
props = myObject.GetType().GetProperties(System.Reflection.BindingFlags.Public
| System.Reflection.BindingFlags.Instance);
Console.WriteLine(Environment.NewLine + "All in inheritance chain");
Console.WriteLine(string.Join(", ", props.Select(x => x.Name)));