Mono Class Library: System.CodeDom.CodeCompileUnit Overview | Members

System.CodeDom.CodeCompileUnit.Namespaces Property

The Collection of Namespaces that are to be compiled in the Assembly created from this System.CodeDOM.CodeCompileUnit. [Edit]

public CodeNamespaceCollection Namespaces { get; }

Value

Documentation for this section has not yet been entered. [Edit]

Remarks

This snippet demonstrates the use of the Namespaces property.
C# Example
		// Create namespace
		CodeNamespace demoNs= new CodeNamespace("Mono.CodeDomDemo");
		// Add stuff to the namespace
		demoNs.Imports.Add(new CodeNamespaceImport("System.Data"));
...		// Other statements go here
		CodeCompileUnit compileUnit = new CodeCompileUnit();
		compileUnit.Namespaces.Add(demoNs);
		compileUnit.ReferencedAssemblies.Add("System.Data");
  
[Edit]

Requirements

Namespace: System.CodeDom
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0