RootProfilePropertySettingsCollection.GroupSettings 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 ProfileGroupSettingsCollection,包含 ProfileGroupSettings 物件的集合。
public:
property System::Web::Configuration::ProfileGroupSettingsCollection ^ GroupSettings { System::Web::Configuration::ProfileGroupSettingsCollection ^ get(); };
[System.Configuration.ConfigurationProperty("group")]
public System.Web.Configuration.ProfileGroupSettingsCollection GroupSettings { get; }
[<System.Configuration.ConfigurationProperty("group")>]
member this.GroupSettings : System.Web.Configuration.ProfileGroupSettingsCollection
Public ReadOnly Property GroupSettings As ProfileGroupSettingsCollection
屬性值
ProfileGroupSettingsCollection 集合。
- 屬性
範例
下列程式碼範例示範如何使用 GroupSettings 屬性。 此程式碼範例是提供給 類別之較大範例的 ProfileSection 一部分。
// Display all current ProfileGroupSettings.
Console.WriteLine("Current ProfileGroupSettings:");
int PGSCtr = 0;
foreach (ProfileGroupSettings propGroups in profileSection.PropertySettings.GroupSettings)
{
Console.WriteLine(" {0}: ProfileGroupSetting '{1}'", ++PGSCtr,
propGroups.Name);
int PPSCtr = 0;
foreach (ProfilePropertySettings props in propGroups.PropertySettings)
{
Console.WriteLine(" {0}: ProfilePropertySetting '{1}'", ++PPSCtr,
props.Name);
}
}
' Display all current ProfileGroupSettings.
Console.WriteLine("Current ProfileGroupSettings:")
Dim PGSCtr As Integer = 0
For Each propGroups As ProfileGroupSettings In profileSection.PropertySettings.GroupSettings
Console.WriteLine(" {0}: ProfileGroupSettings '{1}'", ++PGSCtr, _
propGroups.Name)
Dim PPSCtr As Integer = 0
For Each props As ProfilePropertySettings In propGroups.PropertySettings
Console.WriteLine(" {0}: ProfilePropertySetting '{1}'", ++PPSCtr, _
props.Name)
Next
Next
備註
屬性 GroupSettings 可讓您建立集合群組 ProfilePropertySettingsCollection 。