static void Main(string[] args) { for (int i = 0; i < 10000; i++) { new Thread(() => { Singleton1.getInstance(); }).Start(); new Thread(() => { Singleton2.getInstance(); }).Start(); new Thread(() => { Singleton3.getInstance(); }).Start(); new Thread(() => { Singleton4.getInstance(); }).Start(); } Console.Read(); }
private void button1_Click(object sender, EventArgs e) { Singleton1 single1 = Singleton1.getInstance(); }