In C# what are those brackets called above a method in MVC 3?
[ErrorHandler, SomethingHere]
public function Test() {
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
These are called
Attributes.An attribute is a class that inherits from the abstract class System.Attribute. By convention, all attributes are given a class name that ends with the word “Attribute”. Here are some MVC3 Attributes:and you can create your Custom Attributes