CS0633 de erro do compilador

Mensagem de erro

O argumento para o atributo 'attribute' deve ser um identificador válido

Qualquer argumento que você passa para o ConditionalAttribute ou IndexerNameAttribute atributos devem ser um identificador válido. Isso significa que ele não pode conter caracteres sistema autônomo "+" que são ilegais quando elas ocorrem em identificadores.

Exemplo

Este exemplo ilustra CS0633 usando o ConditionalAttribute. O exemplo a seguir gera CS0633.

// CS0633a.cs
#define DEBUG
using System.Diagnostics;
public class Test
{
   [Conditional("DEB+UG")]   // CS0633
   // try the following line instead
   // [Conditional("DEBUG")]
   public static void Main() { }
}

Este exemplo ilustra CS0633 usando o IndexerNameAttribute.

// CS0633b.cs
// compile with: /target:module
#define DEBUG
using System.Runtime.CompilerServices;
public class Test
{
   [IndexerName("Invalid+Identifier")]   // CS0633
   // try the following line instead
   // [IndexerName("DEBUG")]
   public int this[int i] 
   { 
      get { return i; } 
   }
}