// a method to test private static void Mute(IVolume volume) { var timesTried = 0; while (volume.CurrentVolume() != "0") { timesTried++; if(timesTried > 10) return; volume.Quieter(10); } }
// a method to test private static void Mute(IVolume volume) { var timesTried = 0; while (volume.CurrentVolume() != "0") { timesTried++; if (timesTried > 10) { return; } volume.Quieter(10); } }