ProfileGroupSettings.Name プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
このオブジェクトに含まれる ProfilePropertySettings オブジェクトのグループの名前を取得または設定します。
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
プロパティ値
このオブジェクトに含まれるオブジェクトのグループの名前 ProfilePropertySettings 含む文字列。 既定値は空の文字列 ("") です。
- 属性
例
次のコード例は、 Name プロパティの使用方法を示しています。 このコード例は、 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
注釈
グループ名は、 ProfileGroupSettingsCollection コレクション内で一意である必要があります。それ以外の場合は、構成ファイルの保存時に例外が発生します。