首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

这对中括号是什么作用?该如何处理

2012-01-06 
这对中括号是什么作用?????请问前辈们,下面的这对中括号起什么作用C# code[PopedomTypeAttaible(PopedomTy

这对中括号是什么作用?????
请问前辈们,下面的这对中括号起什么作用

C# code
[PopedomTypeAttaible(PopedomType.New)][System.Security.Permissions.PrincipalPermission(System.Security.Permissions.SecurityAction.Demand, Role = "OR")]protected void Button1_Click(object sender, EventArgs e){Response.Write("新增权限");} 


[解决办法]
Custom Attribute
[解决办法]
C#中的 Attribute,一般翻译为特性,可以为丰富类的元数据信息,可以使用反射获取, 在MSDN中搜索看看吧
[解决办法]
设置方法属性
[解决办法]
自定义属性
参见
http://blog.csdn.net/onlyzhangqin/archive/2007/06/22/1661786.aspx

热点排行