static void TelevisionFunc() { Television television1 = new Television(); television1.IsOn = true; television1.HasSignal = true; television1.Channel = 1; television1.Volume = 0.70f; Console.WriteLine(television1.PrintStatus(television1)); television1.Channel = 5; television1.Volume = 0.20f; Console.WriteLine(television1.PrintStatus(television1)); }
public string PrintStatus(Television x) { return(string.Format("Television is on: {0}, Has signal: {1}, Channel: {2}, Volume: {3:0.00}", x.IsOn, x.HasSignal, x.Channel, x.Volume)); }