Created
November 19, 2013 14:44
-
-
Save chadmichel/7546372 to your computer and use it in GitHub Desktop.
Azure Queue - Write
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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