CS1614 de erro do compilador

Mensagem de erro

'nome' é ambíguo, entre 'attribute1' e 'attribute2'.Use '@ atributo' ou 'attributeAttribute'

O compilador encontrou uma especificação de atributo ambíguo.

Para sua conveniência, o compilador translation from VPE for Csharp permite que você especifique ExampleAttribute sistema autônomo just [Example]. No entanto, a ambigüidade surge se uma classe de atributos nomeado Example existe juntamente com ExampleAttribute, pois o compilador não pode informar se [Example] refere-se à Example atributo ou a ExampleAttribute atributo.Para esclarecer, use [@Example] para o Example atributo e [ExampleAttribute] para ExampleAttribute.

O exemplo a seguir gera CS1614:

// CS1614.cs
using System;

// Both of the following classes are valid attributes with valid
// names (MySpecial and MySpecialAttribute). However, because the lookup
// rules for attributes involves auto-appending the 'Attribute' suffix
// to the identifier, these two attributes become ambiguous; that is,
// if you specify MySpecial, the compiler can't tell if you want
// MySpecial or MySpecialAttribute.

public class MySpecial : Attribute {
   public MySpecial() {}
}

public class MySpecialAttribute : Attribute {
   public MySpecialAttribute() {}
}

class MakeAWarning {
   [MySpecial()] // CS1614
                 // Ambiguous: MySpecial or MySpecialAttribute?
   public static void Main() {
   }

   [@MySpecial()] // This isn't ambiguous, it binds to the first attribute above.
   public static void NoWarning() {
   }

   [MySpecialAttribute()] // This isn't ambiguous, it binds to the second attribute above.
   public static void NoWarning2() {
   }

   [@MySpecialAttribute()] // This is also legal.
   public static void NoWarning3() {
   }
}