This documentation is archived and is not being maintained.

OracleParameterCollection.Item Property (String)

Gets or sets the OracleParameter with the specified name.

Namespace: System.Data.OracleClient
Assembly: System.Data.OracleClient (in

public OracleParameter this [
	string parameterName
] { get; set; 
/** @property */
public OracleParameter get_Item (String parameterName)

/** @property */
public void set_Item (String parameterName, OracleParameter value)

JScript supports the use of indexed properties, but not the declaration of new ones.



The name of the parameter to retrieve.

Property Value

The OracleParameter with the specified name.

Exception typeCondition


The name specified does not exist.

The following example searches for an OracleParameter with a given .Data.OracleClient.OracleParameter.ParameterName within an OracleParameterCollection. If the parameter exists, the example displays the name and index of the parameter. If the parameter does not exist, the example displays an error. This example assumes that an OracleParameterCollection has already been created.

public void SearchOracleParams() 
    // ...
    // create OracleParameterCollection parameters
    // ...
    if (!parameters.Contains("DName"))
        Console.WriteLine("ERROR: no such parameter in the collection");
        Console.WriteLine("Name: " + parameters["DName"].ToString() +
            "Index: " + parameters.IndexOf("DName").ToString());

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1