日期:2014-05-18  浏览次数:20870 次

这对中括号是什么作用?????
请问前辈们,下面的这对中括号起什么作用
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