ProfileSettingsCollection.Add(ProfileSettings) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션에 ProfileSettings 개체를 추가합니다.
public:
void Add(System::Web::Configuration::ProfileSettings ^ profilesSettings);
public void Add(System.Web.Configuration.ProfileSettings profilesSettings);
member this.Add : System.Web.Configuration.ProfileSettings -> unit
Public Sub Add (profilesSettings As ProfileSettings)
매개 변수
- profilesSettings
- ProfileSettings
ProfileSettings 컬렉션에 추가할 개체입니다.
예외
추가할 개체가 ProfileSettings 컬렉션에 이미 있거나 컬렉션이 읽기 전용입니다.
예제
다음 코드 예제에서는 메서드를 사용 하는 방법을 보여 있습니다 Add . 이 코드 예제는 클래스에 제공된 더 큰 예제의 HealthMonitoringSection 일부입니다.
// Get the current Enabled property value.
Boolean enabledValue = healthMonitoringSection.Enabled;
// Set the Enabled property to false.
healthMonitoringSection.Enabled = false;
' Get the current Enabled property value.
Dim enabledValue As Boolean = healthMonitoringSection.Enabled
' Set the Enabled property to False.
healthMonitoringSection.Enabled = False
설명
컬렉션에 이름이 같은 개체가 ProfileSettings 아직 포함되어 있지 않아야 합니다.