什么是'@'之前在方法声明中的参数名称char是什么意思? [英] What does '@' char mean before parameter name in method declaration?

查看:233
本文介绍了什么是'@'之前在方法声明中的参数名称char是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能显示的文件:
  <一href="http://stackoverflow.com/questions/429529/what-does-the-symbol-before-a-variable-name-mean-in-c">What没有一个变量名前的@符号在C#是什么意思?
  <一href="http://stackoverflow.com/questions/91817/whats-the-use-meaning-of-the-character-in-variable-names-in-c">What's在C#中的变量名的@符号的使用/含义?

Possible Duplicates:
What does the @ symbol before a variable name mean in C#?
What's the use/meaning of the @ character in variable names in C#?

您好,

我有一个快速的问题。什么是'@'之前在方法声明中的参数名称char是什么意思?就像下面的:

I have one quick question. What does '@' char mean before parameter name in method declaration? Like following:

protected void Method1(Type1 @arg1, Type2 arg2)
...

我使用C#与.NET 3.5。

I use c# with .net 3.5.

感谢。

推荐答案

它允许保留字用作标识符。它通常用它可能使用源名称,从不同的关键字比目标语言,如系统code发电机表名和存储过程的参数名称。

It allows reserved words to be used as identifiers. It is usually used by code generators which may be using source names from systems with different keywords than the target language e.g. table names and sproc argument names.

这篇关于什么是'@'之前在方法声明中的参数名称char是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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