Compiler Error J0256

Expected 'class', 'interface', or 'delegate'

The compiler expected to find the class, interface, or delegate keywords used within the corresponding declaration. This error usually occurs when the keywords are accidentally omitted from a class, interface, or delegate declaration. Another possible cause of this error is unbalanced scoping braces.

Note   This error will only occur if the Microsoft Extensions are enabled in your project. Otherwise, compiler error J0020 will be displayed.

The following example illustrates this error:

public Simple{ //error: missing the 'class' keyword
   //Do something here
}

This example illustrates this error caused by unbalanced scoping braces:

public class Simple {
   
   // do something meaningful
   
}}   // error: additional '}' is not permitted