How to get MethodInfo for basic methods, not properties and events, via reflection?
.net, c#, reflection
Solution
The following answer from this post Filtering out auto-generated methods getter/setter/add/remove/.etc) returned by Type.GetMethods() should work
typeof(MyType)
.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)
.Where(m => !m.IsSpecialName)
Problem
I'm performing some reflective interrogation of an object. The code lists constructor(s), properties, and methods. `GetMethods( )` returns property accessor/mutator methods and event add/remove methods. How can I get just the basic method definitions? Update ``` .IsSpecialName ``` is the operative property. Thanks, @Hans.