Azure - Manage Blob Storage - Part #4 - List Content inside an Existing Container using C#
Problem Definition
How to list content inside a container using C# in Azure.
Prerequisites
Access to Azure Portal - http://portal.azure.com
Azure General Purpose Storage Account
Microsoft Visual Studio(For this demo used Visual Studio Community for Mac)
Storage Account connection string as described in Part #1
Complete Visual studio connectivity to Azure as described in Part #1
Create a blob container as described in in Part #2
Create a block blob and upload a sample file as described in Part #3
Azure General Purpose Storage Account
Microsoft Visual Studio(For this demo used Visual Studio Community for Mac)
Storage Account connection string as described in Part #1
Complete Visual studio connectivity to Azure as described in Part #1
Create a blob container as described in in Part #2
Create a block blob and upload a sample file as described in Part #3
Use following code to set up a new method in your class "BlobStorageContainer.cs"
- CloudBlobContainer will use the name that was passed to check if container exists or not.
- For block blob to be created container should be existing refer to Part #2 to see how to create the container.
- In order to list the content successfully make sure you have an item created inside the container, such as a block blob as created in Part #3
How to call from "Program.cs"
Results
- Program execution
Comments
Post a Comment