Esempio n. 1
0
        static void Main(string[] args)
        {
            BinaryFormatter bf = new BinaryFormatter();
            Stream stream = File.OpenRead(@"file.s");
            pfoo = (ClassLibrary1.FooClass)bf.Deserialize(stream);
            Thread[] t = new Thread[4];
            for (int i = 0; i < 4; i++)
            {
                t[i] = new Thread(foo);
                t[i].Start(i);
            }

            while (true) { }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            BinaryFormatter bf     = new BinaryFormatter();
            Stream          stream = File.OpenRead(@"file.s");

            pfoo = (ClassLibrary1.FooClass)bf.Deserialize(stream);
            Thread[] t = new Thread[4];
            for (int i = 0; i < 4; i++)
            {
                t[i] = new Thread(foo);
                t[i].Start(i);
            }

            while (true)
            {
            }
        }