private static MemberInfo[] GetMethods(Type type) { return type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance).Where(m => { var methodInfo = m as MethodBase; return (methodInfo == null || !methodInfo.IsConstructor && !methodInfo.IsSpecialName); }).ToArray(); }