public static MethodInfo GetMethod(this Type type, string name) { foreach (var method in type.GetRuntimeMethods()) { if (method.Name == name) { return method; } } return null; }