Share via


ProfilePropertySettingsCollection.Add(ProfilePropertySettings) 메서드

정의

컬렉션에 ProfilePropertySettings 개체를 추가합니다.

public:
 void Add(System::Web::Configuration::ProfilePropertySettings ^ propertySettings);
public void Add (System.Web.Configuration.ProfilePropertySettings propertySettings);
member this.Add : System.Web.Configuration.ProfilePropertySettings -> unit
Public Sub Add (propertySettings As ProfilePropertySettings)

매개 변수

propertySettings
ProfilePropertySettings

컬렉션에 추가할 ProfilePropertySettings 개체입니다.

예외

추가할 ProfilePropertySettings 개체가 이미 컬렉션에 있거나 컬렉션이 읽기 전용입니다.

예제

다음 코드 예제에서는 Add 메서드를 사용하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 ProfileSection 클래스입니다.

// Add a new PropertySettings to the group.
ProfilePropertySettings newProp = new ProfilePropertySettings("AvatarImage");
newProp.Type = "System.String, System.dll";
newPropGroup.PropertySettings.Add(newProp);
' Add a new PropertySettings to the group.
Dim newProp As ProfilePropertySettings = new ProfilePropertySettings("AvatarImage")
newProp.Type = "System.String, System.dll"
newPropGroup.PropertySettings.Add(newProp)

설명

컬렉션에 이미 포함 되지 해야는 ProfilePropertySettings 동일한 이름 가진 개체입니다.

적용 대상

추가 정보