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 プロパティ
を検索
- SqlConnectionStringBuilder.Keys プロパティのページへのリンク