System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.CodeDom.CodeObject System.Runtime.InteropServices.ComVisible(true) System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch) Represents a namespace definition in the CodeDOM `using System; using System.Text; using System.IO; using System.CodeDom; using System.CodeDom.Compiler; using Microsoft.CSharp; /* Outputs an empty namespace called Mono.CodeDomDemo in c# * // Demo Namespace * namespace Mono.CodeDomDemo { * using System.Data; * * } */ class CodeDomDemo { public static int Main(string[] args) { // Create namespace CodeNamespace demoNs= new CodeNamespace("Mono.CodeDomDemo"); // Add stuff to the namespace demoNs.Imports.Add(new CodeNamespaceImport("System.Data")); demoNs.Comments.Add(new CodeCommentStatement("Demo Namespace")); // Generate c# code CSharpCodeProvider provider = new CSharpCodeProvider(); ICodeGenerator codeGen = provider.CreateGenerator (); StringWriter sw = new StringWriter(new StringBuilder()); codeGen.GenerateCodeFromNamespace(demoNs, sw,new CodeGeneratorOptions()); Console.WriteLine(sw.ToString()); return(0); } }`
- Constructor
  Creates an empty object.
  After the object has be constructed, the property has to be set before the Code Generator is called on it.
  1.0.5000.0
  2.0.0.0
- Constructor
  Name of the Namespace to be created
  Creates a object with the specified Namespace name.
  using System; using System.Text; using System.IO; using System.CodeDom; using System.CodeDom.Compiler; using Microsoft.CSharp;

  /* Outputs an empty namespace called Mono.CodeDomDemo in c# * namespace Mono.CodeDomDemo { * * } */ class CodeDomDemo { public static int Main(string[] args) { // Create namespace CodeNamespace demoNs= new CodeNamespace("Mono.CodeDomDemo"); // Generate c# code CSharpCodeProvider provider = new CSharpCodeProvider(); ICodeGenerator codeGen = provider.CreateGenerator (); StringWriter sw = new StringWriter(new StringBuilder()); codeGen.GenerateCodeFromNamespace(demoNs, sw,new CodeGeneratorOptions()); Console.WriteLine(sw.ToString()); return(0); } }
  1.0.5000.0
  2.0.0.0
- Property
  System.CodeDom.CodeCommentStatementCollection Collection of comments applicable to the Namespace. object, which is a collection of comments on the namespace. `/* Creates namespace like thus when c# code is generated. /* // Demo Namespace /* namespace Mono.CodeDomDemo { /* /* } ... CodeNamespace demoNs= new CodeNamespace("Mono.CodeDomDemo"); demoNs.Comments.Add(new CodeCommentStatement("Demo Namespace")); ...` 1.0.5000.0 2.0.0.0
- Property
  System.CodeDom.CodeNamespaceImportCollection Collection of imports applicable to the namespace object, which is a collection of imports applicable to the namespace. `/* Creates namespace like thus when c# code is generated. /* namespace Mono.CodeDomDemo { /* using System.Data; /* } ... CodeNamespace demoNs= new CodeNamespace("Mono.CodeDomDemo"); demoNs.Imports.Add(new CodeNamespaceImport("System.Data")); ...` 1.0.5000.0 2.0.0.0
- Property
  System.String Name of the Namespace to be generated. Name of the generated Namespace. To be added 1.0.5000.0 2.0.0.0
- Event
  System.EventHandler To be added To be added 1.0.5000.0 2.0.0.0
- Event
  System.EventHandler To be added To be added 1.0.5000.0 2.0.0.0
- Event
  System.EventHandler To be added To be added 1.0.5000.0 2.0.0.0
- Property
  System.CodeDom.CodeTypeDeclarationCollection Collection of CodeDom types that resides inside the namespace. To be added: an object of type 'CodeTypeDeclarationCollection' This is a collection of s that reside inside the Namespace. `// This example creates a Mono.CodeDomDemo namespace and adds a new class 'Hello' to it. ... // Create Hello class CodeTypeDeclaration helloClass=new CodeTypeDeclaration("Hello"); helloClass.IsClass=true; ... CodeNamespace testNs= new CodeNamespace("Mono.CodeDomDemo"); testNs.Types.Add(helloClass);` 1.0.5000.0 2.0.0.0