SqlConnectionStringBuilder.Keys プロパティ
アセンブリ: System.Data (system.data.dll 内)

SqlConnectionStringBuilder 内のキーを格納している ICollection。


新しい SqlConnectionStringBuilder を作成するコンソール アプリケーションの例を次に示します。このコードでは、Keys プロパティから返された ICollection をループ処理しながらキー/値ペアを表示します。
Imports System.Data.SqlClient Module Module1 Sub Main() Dim builder As New SqlConnectionStringBuilder builder.DataSource = "(local)" builder.IntegratedSecurity = True builder.InitialCatalog = "AdventureWorks" ' Loop through the collection of keys, displaying ' the key and value for each item. For Each key As String In builder.Keys Console.WriteLine("{0}={1}", key, builder(key)) Next Console.WriteLine() Console.WriteLine("Press Enter to continue.") Console.ReadLine() End Sub End Module
using System.Data.SqlClient; class Program { static void Main() { SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = "(local)"; builder.IntegratedSecurity = true; builder.InitialCatalog = "AdventureWorks"; // Loop through the collection of keys, displaying // the key and value for each item: foreach (string key in builder.Keys) Console.WriteLine("{0}={1}", key, builder[key]); Console.WriteLine(); Console.WriteLine("Press Enter to continue."); Console.ReadLine(); } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSqlConnectionStringBuilder.Keys プロパティを検索する場合は、下記のリンクをクリックしてください。

- SqlConnectionStringBuilder.Keys プロパティのページへのリンク