I\'ve created attribute like
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] [Serializable] public class TestPropertyAttribute :
The accepted answer by Jon Skeet is a good solution. However, you can write this with shorter code nowadays. It works the same:
public class TestPropertyAttribute : Attribute { public TestPropertyAttribute(string name) { Name = name; } public string Name { get; } }