PageRenderTime 27ms CodeModel.GetById 3ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. using System;
  2. public class runme
  3. {
  4. static void Main()
  5. {
  6. {
  7. // constructors and destructors
  8. nspace_extendNamespace.Outer.Inner1.Color color1 = new nspace_extendNamespace.Outer.Inner1.Color();
  9. nspace_extendNamespace.Outer.Inner1.Color color = new nspace_extendNamespace.Outer.Inner1.Color(color1);
  10. color1.Dispose();
  11. color1 = null;
  12. // class methods
  13. color.colorInstanceMethod(20.0);
  14. nspace_extendNamespace.Outer.Inner1.Color.colorStaticMethod(20.0);
  15. nspace_extendNamespace.Outer.Inner1.Color created = nspace_extendNamespace.Outer.Inner1.Color.create();
  16. created.Dispose();
  17. }
  18. {
  19. // constructors and destructors
  20. nspace_extendNamespace.Outer.Inner2.Color color2 = new nspace_extendNamespace.Outer.Inner2.Color();
  21. nspace_extendNamespace.Outer.Inner2.Color color = new nspace_extendNamespace.Outer.Inner2.Color(color2);
  22. color2.Dispose();
  23. color2 = null;
  24. // class methods
  25. color.colorInstanceMethod(20.0);
  26. nspace_extendNamespace.Outer.Inner2.Color.colorStaticMethod(20.0);
  27. nspace_extendNamespace.Outer.Inner2.Color created = nspace_extendNamespace.Outer.Inner2.Color.create();
  28. created.Dispose();
  29. // Same class different namespaces
  30. nspace_extendNamespace.Outer.Inner1.Color col1 = new nspace_extendNamespace.Outer.Inner1.Color();
  31. nspace_extendNamespace.Outer.Inner2.Color col2 = nspace_extendNamespace.Outer.Inner2.Color.create();
  32. col2.colors(col1, col1, col2, col2, col2);
  33. }
  34. }
  35. }