更改
public class LinqHelper
至
public static class LinqHelper
创建扩展方法时,需要考虑以下几点:
- 其限定一个扩展方法必须是类
non-generic
,static
和non-nested
- 每个扩展方法都必须是一个
static
方法 - 扩展方法的第一个参数应使用
this
关键字。

更改
public class LinqHelper
至
public static class LinqHelper
创建扩展方法时,需要考虑以下几点:
non-generic,
static和
non-nested
static方法
this关键字。