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 4.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.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch) System.Runtime.InteropServices.ComVisible(true) can be used to represent a namespace declaration. The property specifies the name of the namespace. The property contains the namespace import directives for the namespace. The property contains the type declarations for the namespace. The property contains the comments that apply at the namespace level. In some languages, a namespace can function as a container for type declarations; all types in the same namespace are accessible without using fully-qualified type references, if the there is no conflict between type names. Use fully qualified type references to avoid potential ambiguity. Represents a namespace declaration. Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 After the object has be constructed, the property has to be set before the Code Generator is called on it. Initializes a new instance of the class. Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 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); } } Initializes a new instance of the class using the specified name. The name of the namespace being declared. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.CodeDom.CodeCommentStatementCollection 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")); ... Gets the comments for the namespace. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.CodeDom.CodeNamespaceImportCollection 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")); ... Gets the collection of namespace import directives used by the namespace. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String Name of the generated Namespace. To be added Gets or sets the name of the namespace. Event 1.0.5000.0 2.0.0.0 4.0.0.0 System.EventHandler To be added An event that will be raised the first time the collection is accessed. Event 1.0.5000.0 2.0.0.0 4.0.0.0 System.EventHandler To be added An event that will be raised the first time the collection is accessed. Event 1.0.5000.0 2.0.0.0 4.0.0.0 System.EventHandler To be added An event that will be raised the first time the collection is accessed. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.CodeDom.CodeTypeDeclarationCollection 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); Gets the collection of types that the namespace contains.