ProfilePropertySettingsCollection.Add(ProfilePropertySettings) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션에 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 아직 포함되어 있지 않아야 합니다.