CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference(containerName); CloudBlockBlob blob = container.GetBlockBlobReference(blobName); // Acquire a lease on the blob string leaseId = await blob.AcquireLeaseAsync(TimeSpan.FromSeconds(60), null);In this example, we first create a CloudStorageAccount object from a connection string, then use it to create a CloudBlobClient and get a reference to a CloudBlobContainer. Then we get a reference to a CloudBlockBlob inside that container. We call AcquireLeaseAsync on the blob object, passing in a TimeSpan object that represents the lease duration, and null for the proposed lease ID. The method returns a string that represents the lease ID, which we store in the leaseId variable. The package library used in this example is Microsoft.Azure.Storage.Blob, which is part of the Azure SDK for .NET.