Is there a functional difference between the following syntax…
[Foo, Bar]
public class Baz {}
…and this syntax?
[Foo]
[Bar]
public class Baz {}
Assuming each produces identical results when compiled, which is the preferred form?
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.
There is no functional difference. It’s a question of convenience and style.
Most often, I tend to see attributes on their own lines as a way to keep them separate and easy to read. It’s also nice to be able to use the line comment
//to remove attributes individually.