static void takemoney(object o) { bankacount person = (bankacount)o; person.withdroul(50); Console.WriteLine(person.getbalance()); }
static void Main(string[] args) { Console.Title = "guy"; //just for fun bankacount couple = new bankacount(); Thread wife = new Thread(takemoney); wife.Start(couple); couple.withdroul(50); Console.WriteLine(couple.getbalance()); Console.ReadLine(); }