- 博客(2)
- 收藏
- 关注
原创 c# this 关键字
在参数前面加this,表示是一个拓展方法pubic void text(this string s) {……}代表为string类中拓展了一个text方法,通过这个类的对象(即实例化)可以调用 如string a = “hello world” a.text();
2024-02-08 12:26:59
395
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人