为什么在这里使用@符号? [英] Why do we use @ symbol here?
本文介绍了为什么在这里使用@符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么在下面的语句中使用@符号....
我们在哪里可以使用这种类型的语句.....
Why @ symbol is used in the following statement....
Where can we use this type of statements.....
string[] @params = null;
推荐答案
@符号允许您使用保留字.例如:
The @ symbol allows you to use reserved word. For example:
int @class = 15;
上面的作品,而下面的作品则不行:
The above works, when the below wouldn''t:
int class = 15;
前缀"@"
允许将关键字用作标识符 [
The prefix "@"
enables the use of keywords as identifiers[^], which is useful when interfacing with other programming languages. The character @
is not actually part of the identifier, so the identifier might be seen in other languages as a normal identifier, without the prefix. An identifier with an @
prefix is called a verbatim identifier.
这篇关于为什么在这里使用@符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文