Namespaces?

BlitzMax Forums/BlitzMax Programming/Namespaces?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

C# treats namespaces in a way similar to modules. Thanks to using a keyword, you can implement multiple namespaces in one file - something that Java does not allow you to do, for example. By the way, in BlitzMax one does also have to use the "module" keyword, but it does not look as if you could declare multiple modules in one file - there is no "End Module" statement in the language. In C#, the namespace is defined within curly braces like everything else.

In C#, you can implement a multitude of classes with the same name, each in an own namespace. This is different to and more advanced than the "inner class" concept, because an inner class is only known to the class itself, but not to outer classes. So classes do not allow for the same features as namespaces.