匯出 (0) 列印
全部展開

CloudTableClient.DeleteTableIfExist 方法

Deletes the table if it exists.

命名空間: Microsoft.WindowsAzure.StorageClient
組件: Microsoft.WindowsAzure.StorageClient (在 microsoft.windowsazure.storageclient.dll 中)

'用途
Dim instance As CloudTableClient
Dim tableName As String
Dim returnValue As Boolean

returnValue = instance.DeleteTableIfExist(tableName)

public bool DeleteTableIfExist (
	string tableName
)
public boolean DeleteTableIfExist (
	String tableName
)
public function DeleteTableIfExist (
	tableName : String
) : boolean

參數

tableName

The table name.

傳回值

true if the table was deleted; otherwise, false.

The following code example deletes a table if it exists.


public static void DeleteTableIfItExists(CloudStorageAccount storageAccount)
{
    // Create service client for credentialed access to the Table service.
    CloudTableClient tableClient = new CloudTableClient(storageAccount.TableEndpoint.ToString(),
        storageAccount.Credentials);
    if (tableClient.DeleteTableIfExist("Products"))
    {
        Console.WriteLine("Table deleted.");
    }
    else
    {
        Console.WriteLine("The specified table does not exist.");
    }
}

任何這個類型的公用靜態 (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。 並非所有的執行個體成員都是安全執行緒。

開發平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目標平台

社群新增項目

顯示:
© 2014 Microsoft