PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms 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
 1using System;
 2using li_boost_shared_ptr_bitsNamespace;
 3
 4public class runme
 5{
 6  static void Main() 
 7  {
 8    VectorIntHolder v = new VectorIntHolder();
 9    v.Add(new IntHolder(11));
10    v.Add(new IntHolder(22));
11    v.Add(new IntHolder(33));
12
13    int sum = li_boost_shared_ptr_bits.sum(v);
14    if (sum != 66)
15      throw new ApplicationException("sum is wrong");
16
17    HiddenDestructor hidden = HiddenDestructor.create();
18    hidden.Dispose();
19  }
20}