Eksportuj (0) Drukuj
Rozwiń wszystko
Ta zawartość nie jest dostępna w wymaganym języku. Wersja w języku angielskim znajduje się tutaj.

CloudBlob Constructor (CloudBlob)

Updated: April 24, 2013

[This topic is part of the Windows Azure Storage Client Library 1.7, which has been deprecated. The current recommended version is Storage Client Library 3.0.]

Initializes a new instance of the CloudBlob class based on an existing instance.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)


public CloudBlob (
	CloudBlob cloudBlob



Type: Microsoft.WindowsAzure.StorageClient.CloudBlob

An existing reference to a blob.

The following code example creates a reference to an anonymously-accessible blob from another reference to the same blob.

static void AccessPublicBlob2(String blobEndpoint)
  // Create a reference to the blob with the specified absolute URI.
  // For example:
  // "http://storagesample.blob.core.windows.net/myContainer/myBlob.txt"
  CloudBlob publicBlob = new CloudBlob(blobEndpoint);

  // Create another reference to the same blob.
  CloudBlob publicBlob2 = new CloudBlob(publicBlob);
  // Attempt to download the blob's contents using the second reference.
  catch (StorageClientException e)
      Console.WriteLine("Error code: ", e.ErrorCode);
      Console.WriteLine("Error message: ", e.Message);

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

© 2014 Microsoft