I have connected using MQTT. You will need a use the Device Explorer to generate the connection string https://github.com/Azure/azure-iot-sdk-csharp/tree/master/tools/DeviceExplorer
Also this document provides some great pointers – https://www.kepware.com/getattachment/0e337a35-a080-436f-88ec-f4096595ca57/tke-iot-gateway-mqtt-client-azure.pdf
I have connected using MQTT. You will need a use the Device Explorer to generate the connection string https://github.com/Azure/azure-iot-sdk-csharp/tree/master/tools/DeviceExplorer
Also this document provides some great pointers – https://www.kepware.com/getattachment/0e337a35-a080-436f-88ec-f4096595ca57/tke-iot-gateway-mqtt-client-azure.pdf