此关键字在C#中的意义 [英] significane of this keyword in c#

查看:63
本文介绍了此关键字在C#中的意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是c#的新程序员.可以用合适的示例来让我解释这个关键字的意思吗?

i am a new programmer i c#. can sumone explain me the sigificane of this keyword with a suitable example ?

推荐答案

简单的解释是:
this始终指向当前执行的代码所属的对象.

有关更复杂的答案,请阅读给定的MSDN链接.

或随时详细说明您的问题或对答案发表评论.
The simple explanation is:
this always points to the object that the currently executing code belongs to.

For a more sophisticated answer, read the given MSDN link.

Or feel free to elaborate on your question or comment on an answer.


阅读
Read this[^]

hope it helps :)




除此之外,您还可以在扩展方法(.Net 3.5)中使用此关键字.
有关更多信息,请在
此处.
Hi,

In addition to that you can also use this keyword in Extension methods(.Net 3.5).
For more info check here.


这篇关于此关键字在C#中的意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆