ProfileGroupSettings.PropertySettings 属性

定义

获取此对象所包含的配置文件属性设置的集合。

public:
 property System::Web::Configuration::ProfilePropertySettingsCollection ^ PropertySettings { System::Web::Configuration::ProfilePropertySettingsCollection ^ get(); };
[System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)]
public System.Web.Configuration.ProfilePropertySettingsCollection PropertySettings { get; }
[<System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)>]
member this.PropertySettings : System.Web.Configuration.ProfilePropertySettingsCollection
Public ReadOnly Property PropertySettings As ProfilePropertySettingsCollection

属性值

ProfilePropertySettingsCollection

一个 ProfilePropertySettingsCollection 集合,它包含此组中包含的所有 ProfilePropertySettings 对象。

属性

示例

下面的代码示例说明如何使用 PropertySettings 属性。 此代码示例是为类提供的大型示例的 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

适用于

另请参阅