SqlConnectionStringBuilder.Keys プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SqlConnectionStringBuilder.Keys プロパティの意味・解説 

SqlConnectionStringBuilder.Keys プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

SqlConnectionStringBuilder 内のキー格納している ICollection を取得します

名前空間: System.Data.SqlClient
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Overrides ReadOnly
 Property Keys As ICollection
Dim instance As SqlConnectionStringBuilder
Dim value As ICollection

value = instance.Keys
public override ICollection Keys { get; }
public:
virtual property ICollection^ Keys {
    ICollection^ get () override;
}
/** @property */
public ICollection get_Keys ()

プロパティ
SqlConnectionStringBuilder 内のキー格納している ICollection

解説解説

ICollection 内の値の順序指定されていませんが、Values プロパティから返され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();
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlConnectionStringBuilder クラス
SqlConnectionStringBuilder メンバ
System.Data.SqlClient 名前空間
Values
SqlConnectionStringBuilder.Item プロパティ
その他の技術情報
接続文字列使用


このページでは「.NET Framework クラス ライブラリ リファレンス」からSqlConnectionStringBuilder.Keys プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSqlConnectionStringBuilder.Keys プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSqlConnectionStringBuilder.Keys プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SqlConnectionStringBuilder.Keys プロパティ」の関連用語

SqlConnectionStringBuilder.Keys プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlConnectionStringBuilder.Keys プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS