Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am generating a class at run time using System.CodeDom e.g.

VB
Imports System.CodeDom


 'add the imports namespace
 Dim identityGroupInterfaceRet As New CodeCompileUnit()
 'put the namespace hierarchy in...model name..
 Dim modelNamespace As CodeNamespace = New CodeNamespace("Model")


How would I go about nesting another namespace inside this one?
Posted

1 solution

According to this thread[^] on MSDN:

A "nested" namespace is just syntactical sugar by the compiler. As far as the runtime is concerned, namespaces are not hierarchical. It is equivalent to adding a new CodeNamespace("A.B.C.D") to your CodeCompileUnit.Namespaces.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900