我有一个基类,有一个方法,我想在其中使用泛型来强制编码人员在当前类上使用泛型表达式:publicclassTestClass{publicvoidDoStuffWithFuncRef(Expression>expression)whereT:TestClass{this.DoStuffWithFuncRef(Property.NameFor(expression));}}现在,我想强制T成为实例化类的类型,我希望这会导致C#编译器自动理解要使用的泛型类型。例如。我想避免编写下面的doStuff方法,我必须在其中指定正确的类型-而是使用doStuffILikeButCannotGetTo