PageRenderTime 42ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
C# | 20 lines | 17 code | 3 blank | 0 comment | 2 complexity | ebe6946149e43de2ddfc816a4f1f2a17 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. using System;
  2. using li_boost_shared_ptr_bitsNamespace;
  3. public class runme
  4. {
  5. static void Main()
  6. {
  7. VectorIntHolder v = new VectorIntHolder();
  8. v.Add(new IntHolder(11));
  9. v.Add(new IntHolder(22));
  10. v.Add(new IntHolder(33));
  11. int sum = li_boost_shared_ptr_bits.sum(v);
  12. if (sum != 66)
  13. throw new ApplicationException("sum is wrong");
  14. HiddenDestructor hidden = HiddenDestructor.create();
  15. hidden.Dispose();
  16. }
  17. }