static void Main(string[] args) { Vahvistin omaVahvistin = new Vahvistin(); while (true) { omaVahvistin.SetVolume(); } }
static void TestVahvistin() { Vahvistin thomson = new Vahvistin("Thomson"); while (true) { Console.WriteLine("Give a new volume value (0-100)"); thomson.Volume = int.Parse(Console.ReadLine()); thomson.ChangeVolume(thomson.Volume); Console.WriteLine("-> Amplifier volume is set to: {0} ", thomson.Volume); } }