Azure – How to access variable from the while loop in the function to the outside the function in C#?
I am sending telemetry(data) from simulator device to Azure IoT Hub and receiving that telemetry into this code. namespace CentralSystem { internal class Program { static readonly string connectionString = "IoT Hub Connection string here"; static readonly string iotHubD2cEndpoint =…