如:[FormsAuthorize]
public ActionResult Term()
{}
[AjaxPro.AjaxMethod]
public string asd(string sy, string code)
{
}
写在方法前的[] 是做什么用的?
通常被称为什么?
------解决方案--------------------------------------------------------
定制特性
------解决方案--------------------------------------------------------
特性 看帮助 attribute
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
叫attribute,给上面的补个链接
http://msdn.microsoft.com/zh-cn/library/system.attribute%28VS.80%29.aspx
------解决方案--------------------------------------------------------
属性定义。
------解决方案--------------------------------------------------------
特性(Attribute)为自己的代码构造添加一些注解时用的,可以带一些参数。特性不是方法,本质上是一个类,如果是自定义的特性类,应继承System.Attribute。
------解决方案--------------------------------------------------------