There is a rich database of many different examples for working with Azure Service Bus, available on GitHub (you can find a link in the Further reading section), so we will cover only the basic ones in this chapter. Here you can find the most simple way to send a message to a queue:
using System.Text;using System.Threading.Tasks;using Microsoft.Azure.ServiceBus;namespace HandsOnAzure.ServiceBus{ internal class Program { private static void Main() { MainAsync().GetAwaiter().GetResult(); } private static async Task MainAsync() { var client = new QueueClient("<connection-string>", "<queue-name>"); var message = "This is my message!"; await client.SendAsync(new Message(Encoding.UTF8.GetBytes(message))); ...