且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

替代嵌套类型 Expression<Func<T>>

更新时间:2022-05-05 15:40:16

在这种情况下我会抑制它,原因是调用者不必处理嵌套泛型,他只是传递一个 lambda 表达式,它易于使用.

I would suppress it in this case, with the reason that the caller doesn't have to cope with nested generics, he is just passing a lambda expression, which is easy to use.

CA 不会为 lambda 表达式设置例外.有时***是抑制它然后编写奇怪的代码.

CA does not make exceptions for lambda expressions. Sometimes It is better to suppress it then to write weird code.