PageRenderTime 19ms CodeModel.GetById 5ms app.highlight 13ms 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
 3using System;
 4using pointer_referenceNamespace;
 5
 6public class pointer_reference_runme {
 7
 8  public static void Main() {
 9    Struct s  = pointer_reference.get();
10    if (s.value != 10) throw new Exception("get test failed");
11
12    Struct ss = new Struct(20);
13    pointer_reference.set(ss);
14    if (Struct.instance.value != 20) throw new Exception("set test failed");
15  }
16
17}
18