[return: Description("Returns true if the object is in a valid state.")]
public bool IsValid()
{
	throw new NotImplementedException();
}

Common Attributes (C#)

Custom Attributes

Reflection: Find Decorated Classes

public static IEnumerable<Type> GetDecorated<T>(this Assembly assembly, bool inherit = true)
    where T : Attribute 
    => assembly.GetTypes().Where(x => x.GetCustomAttributes(typeof(T), inherit).Any());

AttributeUsage Attribute

// Restrict the attribute to properties and methods
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
public class CommandLineSwitchAliasAttribute : Attribute
{
	// ...
}

Attribute Static Methods

var isDefined = Attribute.IsDefined(typeof(Person), typeof(SerializableAttribute));