Combining multiple attributes in C#

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.

[A]
[B]
//[C] disabled
public class Foo {} 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)