PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/csharp/nspace_extend_runme.cs

#
C# | 39 lines | 30 code | 4 blank | 5 comment | 0 complexity | f28eb09948118c47d1f4e757bf5aa9c4 MD5 | raw file
 1using System;
 2
 3public class runme
 4{
 5  static void Main() 
 6  {
 7    {
 8      // constructors and destructors
 9      nspace_extendNamespace.Outer.Inner1.Color color1 = new nspace_extendNamespace.Outer.Inner1.Color();
10      nspace_extendNamespace.Outer.Inner1.Color color = new nspace_extendNamespace.Outer.Inner1.Color(color1);
11      color1.Dispose();
12      color1 = null;
13
14      // class methods
15      color.colorInstanceMethod(20.0);
16      nspace_extendNamespace.Outer.Inner1.Color.colorStaticMethod(20.0);
17      nspace_extendNamespace.Outer.Inner1.Color created = nspace_extendNamespace.Outer.Inner1.Color.create();
18      created.Dispose();
19    }
20    {
21      // constructors and destructors
22      nspace_extendNamespace.Outer.Inner2.Color color2 = new nspace_extendNamespace.Outer.Inner2.Color();
23      nspace_extendNamespace.Outer.Inner2.Color color = new nspace_extendNamespace.Outer.Inner2.Color(color2);
24      color2.Dispose();
25      color2 = null;
26
27      // class methods
28      color.colorInstanceMethod(20.0);
29      nspace_extendNamespace.Outer.Inner2.Color.colorStaticMethod(20.0);
30      nspace_extendNamespace.Outer.Inner2.Color created = nspace_extendNamespace.Outer.Inner2.Color.create();
31      created.Dispose();
32
33      // Same class different namespaces
34      nspace_extendNamespace.Outer.Inner1.Color col1 = new nspace_extendNamespace.Outer.Inner1.Color();
35      nspace_extendNamespace.Outer.Inner2.Color col2 = nspace_extendNamespace.Outer.Inner2.Color.create();
36      col2.colors(col1, col1, col2, col2, col2);
37    }
38  }
39}