Exemplo n.º 1
0
        static HeavyClass Fill()
        {
            HeavyClass hc = new HeavyClass();

            hc.v    = 77;
            hc.varr = new int[rnd.Next(1, 10)];
            for (int i = 0; i < hc.varr.Length; ++i)
            {
                hc.varr[i] = rnd.Next(1, 100);
            }
            hc.mvarr = new int[rnd.Next(1, 10)][];
            for (int i = 0; i < hc.mvarr.Length; ++i)
            {
                hc.mvarr[i] = new int[rnd.Next(0, 6)];
                for (int j = 0; j < hc.mvarr[i].Length; ++j)
                {
                    hc.mvarr[i][j] = rnd.Next(0, 150);
                }
            }
            hc.sa   = MyClass.RandomInstance;
            hc.msa  = new MyClass[rnd.Next(5, 10)];
            hc.lmsa = new List <MyClass>();
            for (int i = 0; i < hc.msa.Length; ++i)
            {
                hc.msa[i] = MyClass.RandomInstance;
            }
            for (int i = 0; i < rnd.Next(1, hc.msa.Length); ++i)
            {
                hc.lmsa.Add(hc.msa[rnd.Next(1, hc.msa.Length - 1)]);
            }
            hc.superName = "Fill";
            hc.fvalue    = (float)rnd.NextDouble() * 50F;
            return(hc);
        }
Exemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     _mre        = new ManualResetEvent(true);
     _heavyClass = new HeavyClass(_mer);
 }