Are there any other useful attributes for c# properties?

attributes, c#, properties

Solution

[Obsolete("This is an obsolete property")]

That's one of my favourites. Allows you to mark a property/method obsolete, which will cause a compiler warning (optionally, a compiler error) on build.

Problem

Possible Duplicate: Most Useful Attributes in C# besides: ``` [DefaultValue(100)] [Description("Some descriptive field here")] public int MyProperty{get; set;} ``` What other C# Attributes are useful for Properties, after learning these I feel like I'm Missing out. Related Questions Most Useful Attributes in C#

Original source

Related problems