How to list interface methods omitting property accessors [duplicate]
问题 This question already has an answer here : BindingFlags for Type.GetMethods excluding property accessors (1 answer) Closed 6 years ago . I would like to use reflection to display a list of methods in an interface. public interface IRoadVehicle { int WheelCount { get; } bool IsEmergency(); } I use following code: foreach (var m in typeof(IRoadVehicle).GetMethods()) { Console.WriteLine(m.Name); } However, I also get listed the compiler-generated property accessors if the interface has a