System.Linq.CachedReflectionInfo.ElementAt_TSource_2 C# (CSharp) Метод

ElementAt_TSource_2() публичный статический Метод

public static ElementAt_TSource_2 ( Type TSource ) : MethodInfo
TSource Type
Результат System.Reflection.MethodInfo
        public static MethodInfo ElementAt_TSource_2(Type TSource) =>
             (s_ElementAt_TSource_2 ??
             (s_ElementAt_TSource_2 = new Func<IQueryable<object>, int, object>(Queryable.ElementAt).GetMethodInfo().GetGenericMethodDefinition()))
              .MakeGenericMethod(TSource);

Usage Example

 public static TSource ElementAt <TSource>(this IQueryable <TSource> source, Index index)
 {
     if (source == null)
     {
         // throw Error.ArgumentNull(nameof(source));
         throw new ArgumentNullException(nameof(source));
     }
     return(source.Provider.Execute <TSource>(
                Expression.Call(
                    null,
                    CachedReflectionInfo.ElementAt_TSource_2(typeof(TSource)),
                    source.Expression, Expression.Constant(index)
                    )));
 }
CachedReflectionInfo