OracleConnectionStringBuilder.Values Property

Definition

Gets an ICollection that contains the values in the OracleConnectionStringBuilder.

C#
public override System.Collections.ICollection Values { get; }

Property Value

An ICollection that contains the values in the OracleConnectionStringBuilder.

Examples

The following example first creates a new OracleConnectionStringBuilder, and then iterates through all the values within the object.

C#
// 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(GetConnectionString());

        // Loop through each of the values, displaying the contents.
        foreach (object value in builder.Values)
            Console.WriteLine(value);

        Console.WriteLine("Press any key to continue.");
        Console.ReadLine();
    }

    private static string GetConnectionString()
    {
        // To avoid storing the connection string in your code,
        // you can retrieve it from a configuration file.
        return "Data Source=OracleSample;Integrated Security=true;" +
            "Persist Security Info=True; Max Pool Size=100; Min Pool Size=1";
    }
}

Remarks

The order of the values in the ICollection is unspecified, but it is the same order as the associated keys in the ICollection returned by the Keys property. Because each instance of the OracleConnectionStringBuilder always contains the same fixed set of keys, the Values property always returns the values corresponding to the fixed set of keys, in the same order as the keys.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also