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 아직 포함되어 있지 않아야 합니다.

적용 대상

추가 정보