PageRenderTime 55ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/csharp/pointer_reference_runme.cs

#
C# | 18 lines | 11 code | 6 blank | 1 comment | 4 complexity | 61825a8794c4a9d2176b737c4e07686f MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. // This test tests all the methods in the C# collection wrapper
  2. using System;
  3. using pointer_referenceNamespace;
  4. public class pointer_reference_runme {
  5. public static void Main() {
  6. Struct s = pointer_reference.get();
  7. if (s.value != 10) throw new Exception("get test failed");
  8. Struct ss = new Struct(20);
  9. pointer_reference.set(ss);
  10. if (Struct.instance.value != 20) throw new Exception("set test failed");
  11. }
  12. }