// using System; [assembly: CLSCompliant(true)] [AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct)] public class NumericAttribute { private bool _isNumeric; public NumericAttribute(bool isNumeric) { _isNumeric = isNumeric; } public bool IsNumeric { get { return _isNumeric; } } } [Numeric(true)] public struct UDouble { double Value; } // Compilation produces a compiler error like the following: // Attribute1.cs(22,2): error CS0616: 'NumericAttribute' is not an attribute class // Attribute1.cs(7,14): (Location of symbol related to previous error) // public class Example { public static void Main() { } }