OracleConnectionStringBuilder.Keys Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
ICollection Mendapatkan yang berisi kunci di 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
Nilai Properti
Yang ICollection berisi kunci di OracleConnectionStringBuilder.
Contoh
Contoh aplikasi konsol berikut membuat baru OracleConnectionStringBuilder. Kode mengulang melalui ICollection yang dikembalikan oleh properti yang Keys menampilkan pasangan kunci/nilai.
// 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
Keterangan
Urutan nilai dalam ICollection tidak ditentukan, tetapi urutannya sama dengan nilai terkait dalam yang ICollection dikembalikan oleh Values properti .
Berlaku untuk
Lihat juga
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk