Connecting to MQTT Broker

Hi. I have a project where my Node-Red is hosting in Heroku. However, I don't know how to configure and connect to "MQTT Out" in Heroku from my local code in C#.

Hope to get solution for this. Thank you guys who respond to this topic and you may also try to start discussion with me even you are not sure with the solution.

Welcome to the forum.

Are you asking for help on how to connect to an mqtt broker from c# code? Note that mqtt goes through a broker, each client connects to the broker, not directly client to client.
If you don't know about mqtt then Google for
Hive mqtt essentials
And you will find an excellent tutorial.