Show/Hide Toolbars

XSharp

A namespace does not directly contain members such as fields or methods

 

Inside a namespace, the compiler only accepts classes, structures, unions, enumerations, interfaces, and delegates. This error is often generated by developers from a C/C++ background who forget that in X#, methods and variables must be declared and defined within a struct or class. For more information, see General Structure of a X# Program.

Example

 

The following sample generates XS0116:

 

 

// XS0116.prg