this关键字 共 1 篇文章

C# 扩展方法:static 类与 this 关键字
2026-04-03 14:06:12
C 扩展方法:static 类与 this 关键字 C 的扩展方法让你能在不修改原始类型定义的前提下,为已有类型“添加”新方法。实现它只需要两个关键要素:一个 static 类和一个带有 this 关键字的 static 方法。 创建扩展方法的基本步骤 1. 新建一个 public static 类
C#扩展方法 静态类 this关键字
5 0