Skip to content

Instantly share code, notes, and snippets.

@f2koi-shiftup
f2koi-shiftup / reflection.cs
Created July 8, 2025 04:11
Find System.Linq.Queryable.Where<TSource> by reflection
public static class A
{
private static MethodInfo WhereMethodInfo()
{
var tSource = typeof(Queryable)
.GetMethods()
.Where(m => m.Name == nameof(Queryable.Where))
.First()
.GetGenericArguments()[0];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.