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 고유해야 합니다. 그렇지 않으면 구성 파일을 저장할 때 예외가 발생합니다.