Archived
This forum has been archived. Please start a new discussion on GitHub.
Nested Modules
in Help Center
Hello,
Im implementing part of a framework and my come will be placed in a namespece Framework.ISC.Messaging.
When I write my .ice file I would like to put the classes of the resulting .cs file in the same namespace, so I tryed to write this:
module Framework.ISC.Messaging {
... all my structures ...
};
But I had a syntax error from the slice2cs process.
I tryed with:
module Framework {
module ISC {
module Messaging {
... all my structures ...
};
};
};
And it worked.
Is it the only way to do it?
Tnx in advance
Im implementing part of a framework and my come will be placed in a namespece Framework.ISC.Messaging.
When I write my .ice file I would like to put the classes of the resulting .cs file in the same namespace, so I tryed to write this:
module Framework.ISC.Messaging {
... all my structures ...
};
But I had a syntax error from the slice2cs process.
I tryed with:
module Framework {
module ISC {
module Messaging {
... all my structures ...
};
};
};
And it worked.
Is it the only way to do it?
Tnx in advance
0
Comments
-
Hi,
Yes, it's the only way to do it in C#. You need to declare the three modules in the Slice.
Cheers,
Benoit.0