共用方式為


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 物件的參數。

適用於