Expected class, delegate, enum, interface, struct, or union
A declaration was found that is not supported in a namespace. Inside a namespace, the compiler accepts only classes, structs, unions, enums, interfaces, and delegates.
The following sample generates CS1518:
namespace x { sealed class c1 {}; // OK public namespace f2 {}; // CS1518 sealed f3 {}; // CS1518 }