Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1519 

Error Message

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. To fix the error, remove the invalid modifiers.

The following sample generates CS1519:

// CS1519.cs
public class IMyInterface
{
   checked void f4();   // CS1519
   // Remove "checked" from the line above.
   lock void f5();      // CS1519
   // Remove "lock" from the line above
   namespace;           // CS1519
   // The line above should be removed entirely.
   int i;               // OK
}

Community Additions

ADD
Show:
© 2014 Microsoft