Edit

Share via


Compiler Error CS1638

'identifier' is a reserved identifier and cannot be used when ISO language version mode is used

When the ISO language compatibility option is specified by the /langversion compiler switch, any identifier with double underscores anywhere in the identifier will produce this error. To avoid this error, eliminate any identifiers with double underscores, or do not use the ISO-1 language version option.

Example

The following sample generates CS1638:

C#
// CS1638.cs  
// compile with: /langversion:ISO-1  
class bad__identifier // CS1638 (double underscores are not ISO compliant)  
{  
}  
  
// Try this instead:  
//class GoodIdentifier  
//{  
//}  
  
class CMain  
{  
    public static void Main() { }  
}  

See also