Skip to content

Instantly share code, notes, and snippets.

@chadmichel
Created November 19, 2013 14:44
Show Gist options
  • Save chadmichel/7546372 to your computer and use it in GitHub Desktop.
Save chadmichel/7546372 to your computer and use it in GitHub Desktop.
Azure Queue - Write
class Program
{
static void Main(string[] args)
{
CloudStorageAccount storageAccount = CloudStorageAccount.DevelopmentStorageAccount;
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
// Retrieve a reference to a queue.
CloudQueue queue = queueClient.GetQueueReference("myqueue");
// Create the queue if it doesn't already exist.
queue.CreateIfNotExists();
// create queue message
CloudQueueMessage message = new CloudQueueMessage("Hello, World");
// add to queue
queue.AddMessage(message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment