OracleConnectionStringBuilder.Keys 속성

정의

ICollection의 키를 포함하는 OracleConnectionStringBuilder을 가져옵니다.

public:
 virtual property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public override System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public Overrides ReadOnly Property Keys As ICollection

속성 값

ICollection의 키를 포함하는 OracleConnectionStringBuilder입니다.

예제

다음 콘솔 애플리케이션 예제에서는 새 OracleConnectionStringBuilder를 만듭니다. 이 코드에서는 ICollection 속성이 반환하는 Keys을 반복하여 키/값 쌍을 표시합니다.

// You may need to set a reference to the System.Data.OracleClient
// assembly before running this example.
using System.Data.OracleClient;

class Program
{
    static void Main()
    {
        OracleConnectionStringBuilder builder =
            new OracleConnectionStringBuilder();
        builder.DataSource = "OracleSample";
        builder.IntegratedSecurity = true;

        // 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();
    }
}
' You may have to set a reference to the System.Data.OracleClient
' assembly before running this example.
Imports System.Data.OracleClient

Module Module1
  Sub Main()
    Dim builder As New OracleConnectionStringBuilder
    builder.DataSource = "OracleSample"
    builder.IntegratedSecurity = True

    ' 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

설명

ICollection에서 값의 순서는 지정되지 않지만 ICollection 속성이 반환하는 Values의 연결된 값과 순서가 동일합니다.

적용 대상

추가 정보