ProviderSettings.Parameters Свойство

Определение

Возвращает коллекцию пользовательских параметров для поставщика.

public:
 property System::Collections::Specialized::NameValueCollection ^ Parameters { System::Collections::Specialized::NameValueCollection ^ get(); };
public System.Collections.Specialized.NameValueCollection Parameters { get; }
member this.Parameters : System.Collections.Specialized.NameValueCollection
Public ReadOnly Property Parameters As NameValueCollection

Значение свойства

NameValueCollection параметров для поставщика.

Примеры

В следующем примере кода показано, как осуществляется доступ к свойству Parameters.

NameValueCollection parameters =
    pSettings.Parameters;

IEnumerator pEnum =
    parameters.GetEnumerator();

int i = 0;
while (pEnum.MoveNext())
{
    string pLength =
        parameters[i].Length.ToString();
    Console.WriteLine(
        "Provider ssettings: {0} has {1} parameters",
        pSettings.Name, pLength);
}
    Dim parameters _
    As NameValueCollection = pSettings.Parameters

    Dim pEnum _
    As IEnumerator = parameters.GetEnumerator()

    Dim i As Integer = 0
    While pEnum.MoveNext()
        Dim pLength As String = _
        parameters(i).Length.ToString()
        Console.WriteLine( _
        "Provider ssettings: {0} has {1} parameters", _
        pSettings.Name, pLength)
    End While
Next pSettings

Комментарии

Используйте свойство для Parameters доступа NameValueCollection к параметрам этого ProviderSettings объекта.

Применяется к