ProfileSettingsCollection.Insert(Int32, ProfileSettings) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 ProfileSettings 개체를 컬렉션의 지정된 인덱스에 삽입합니다.
public:
void Insert(int index, System::Web::Configuration::ProfileSettings ^ authorizationSettings);
public void Insert(int index, System.Web.Configuration.ProfileSettings authorizationSettings);
member this.Insert : int * System.Web.Configuration.ProfileSettings -> unit
Public Sub Insert (index As Integer, authorizationSettings As ProfileSettings)
매개 변수
- index
- Int32
컬렉션에 있는 ProfileSettings 개체의 인덱스입니다.
- authorizationSettings
- ProfileSettings
컬렉션에 삽입할 ProfileSettings 개체입니다.
예외
추가할 ProfileSettings 개체가 컬렉션에 이미 있거나 인덱스가 유효하지 않거나 컬렉션이 읽기 전용인 경우
예제
다음 코드 예제에서는 Insert 메서드를 사용하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 HealthMonitoringSection 클래스입니다.
// Insert an ProfileSettings object into the Profiles collection property.
healthMonitoringSection.Profiles.Insert(1, new ProfileSettings("Default2"));
' Insert an ProfileSettings object into the Profiles collection property.
healthMonitoringSection.Profiles.Insert(1, new ProfileSettings("Default2"))
설명
경우는 index 매개 변수 컬렉션의 항목 수가 같으면 항목 컬렉션의 끝에 추가 됩니다.