in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs [31:52]
private async static Task PromptUser()
{
bool continueFlag = true;
Console.Clear();
do
{
device = GetReadLineInteger("Send command to a device - Enter device number (0-9): ",
0, 9);
temperature = GetReadLineDouble("Enter a temperature (F) to send (65 - 85): ",
65, 85);
Console.WriteLine();
Console.WriteLine($"Sending temperature request of {temperature} to Device{device}");
await SendCloudToDeviceMessageAsync();
Console.WriteLine();
if (GetReadLine("Send another message (Y/N): ", new string[] { "Y", "N" }).ToUpper() == "N")
continueFlag = false;
Console.Clear();
} while (continueFlag);
}