This documentation is archived and is not being maintained.

Compiler Error CS1519

Invalid token 'token' in class, struct, or interface member declaration

Any class, struct, or interface member declaration that contains invalid modifiers before the type will generate this error.

The following sample generates CS1519:

// CS1519.cs
public class IMyInterface
{
   checked void f4();   // CS1519
   lock void f5();      // CS1519
   namespace;           // CS1519
   int i;               // OK
}
Show: