[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See
Storage Client Library for the latest version.]
Returns a connection string for this storage account, without sensitive data.
Namespace: Microsoft.WindowsAzure
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
Usage
Visual Basic |
---|
Dim instance As CloudStorageAccount
Dim returnValue As String
returnValue = instance.ToString |
Syntax
Visual Basic |
---|
Public Overrides Function ToString As String |
C# |
---|
public override string ToString () |
C++ |
---|
public:
virtual String^ ToString () override |
Return Value
Type:
System.StringA connection string.
Example
The following code example creates a reference to a storage account from a connection string, then writes out the connection string, without sensitive data.
C# | Copy Code |
---|
static void GetConnectionString()
{
//Parse a connection string and return a reference to the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageAccountConnectionString"]);
//Output the connection string, omitting sensitive data (for example, the account key, if based on account and key credentials).
Console.WriteLine("Connection string without sensitive data: " + storageAccount.ToString());
}
|
Remarks
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Change History
See Also