什么是[]括号中的.NET? [英] what is [] brackets in .net?

查看:206
本文介绍了什么是[]括号中的.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到[]这样的括号在C#中非常很少,但是当我开始学习asp.net我看到他们很多次,但我依然无法理解他们呢?

i have seen [] such brackets in c# very very rarely but when i start to learn asp.net i have seen them many times but still i couldn't understand what they does ?

它们不是code一部分使用的arrays.For例如[webMethods的]这仅仅是在方法还是存在一定过班。难道他们的.NET部分或他们只是告诉的东西CLR?要么 ?

They are not part of code as using for arrays.For example [webmethods] which is just over the methods or there are some over classes. Are they part of .net or they are just tell something to CLR ? or ?

推荐答案

它们被用来放在类或方法(或其他东西)属性。禅师的方式,可以将数据附加到类,不应该是实际的类的一部分。你可以阅读更多关于它们的这里

They are used to put Attributes on classes or methods (or other stuff). Thay way, you can attach data to classes that should not be part of the actual class. You can read more on them here.

这篇关于什么是[]括号中的.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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