System.Linq.Error.NoMethodOnTypeMatchingArguments C# (CSharp) Метод

NoMethodOnTypeMatchingArguments() статический приватный Метод

static private NoMethodOnTypeMatchingArguments ( string name, object type ) : Exception
name string
type object
Результат Exception
        internal static Exception NoMethodOnTypeMatchingArguments(string name, object type) =>
            new InvalidOperationException(Strings.NoMethodOnTypeMatchingArguments(name, type));

Usage Example

 private static MethodInfo FindMethod(Type type, string name, ReadOnlyCollection <Expression> args, Type[] typeArgs)
 {
     using (IEnumerator <MethodInfo> en = type.GetStaticMethods().Where(m => m.Name == name).GetEnumerator())
     {
         if (!en.MoveNext())
         {
             throw Error.NoMethodOnType(name, type);
         }
         do
         {
             MethodInfo mi = en.Current;
             if (ArgsMatch(mi, args, typeArgs))
             {
                 return((typeArgs != null) ? mi.MakeGenericMethod(typeArgs) : mi);
             }
         } while (en.MoveNext());
     }
     throw Error.NoMethodOnTypeMatchingArguments(name, type);
 }
All Usage Examples Of System.Linq.Error::NoMethodOnTypeMatchingArguments