다음을 통해 공유


ProfileSettingsCollection.Add(ProfileSettings) 메서드

정의

컬렉션에 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 동일한 이름 가진 개체입니다.

적용 대상

추가 정보