共用方式為


SessionStateSection.Providers 屬性

定義

取得目前的 ProviderSettingsCollection 提供者。

public:
 property System::Configuration::ProviderSettingsCollection ^ Providers { System::Configuration::ProviderSettingsCollection ^ get(); };
[System.Configuration.ConfigurationProperty("providers")]
public System.Configuration.ProviderSettingsCollection Providers { get; }
[<System.Configuration.ConfigurationProperty("providers")>]
member this.Providers : System.Configuration.ProviderSettingsCollection
Public ReadOnly Property Providers As ProviderSettingsCollection

屬性值

ProviderSettingsCollection

包含 SessionStateSection 提供者的集合。

屬性

範例

下列程式碼範例示範如何取得 Providers 屬性。 請參閱類別主題中的 SessionStateSection 程式碼範例,以瞭解如何存取 SessionStateSection 物件。

// Display elements of the Providers collection property.
foreach (ProviderSettings providerItem in sessionStateSection.Providers)
{
  Console.WriteLine();
  Console.WriteLine("Provider Details:");
  Console.WriteLine("Name: {0}", providerItem.Name);
  Console.WriteLine("Type: {0}", providerItem.Type);
}
' Display the current Providers property value.
For Each providerItem As ProviderSettings In sessionStateSection.Providers()
  Console.WriteLine()
  Console.WriteLine("Provider Details:")
  Console.WriteLine("Name: {0}", providerItem.Name)
  Console.WriteLine("Type: {0}", providerItem.Type)
Next

備註

這個屬性是指 元素所 providers 識別之組態標記所包含的資訊。

適用於