ProfileGroupSettings.Name Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Dient zum Abrufen oder Festlegen des Namens der Gruppe von ProfilePropertySettings Objekten, die dieses Objekt enthält.
public:
property System::String ^ Name { System::String ^ get(); };
[System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)]
public string Name { get; }
[<System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)>]
member this.Name : string
Public ReadOnly Property Name As String
Eigenschaftswert
Eine Zeichenfolge, die den Namen der Gruppe von ProfilePropertySettings Objekten enthält, die dieses Objekt enthält. Der Standardwert ist eine leere Zeichenfolge ("").
- Attribute
Beispiele
Das folgende Codebeispiel zeigt, wie die Name Eigenschaft verwendet wird. Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die ProfileSection Klasse bereitgestellt wird.
// 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
Hinweise
Der Gruppenname muss innerhalb einer ProfileGroupSettingsCollection Auflistung eindeutig sein. Andernfalls wird eine Ausnahme ausgelöst, wenn die Konfigurationsdatei gespeichert wird.