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使用 属性访问NameValueCollectionProviderSettings对象的参数。

适用于