Azure - Manage Blob Storage - Part #9 - Delete Blob Container using C#


Problem Definition

How to delete a blob 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

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.




How to call from "Program.cs"


Results

  • Program execution



  • Azure confirmation



Resources

https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet?tabs=macos

Comments

Popular posts from this blog

Azure - Manage Blob Storage - Part #7 - Add Metadata to an Existing Container using C#

Azure - Manage Blob Storage - Part #5 - Create Folder Structure and upload a file to folder using an Existing Container using C#

Algorithm - Breadth First Search(BFS) - Python(3)