ClientTargetCollection.Add(ClientTarget) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션에 지정된 ClientTarget 개체를 추가합니다.
public:
void Add(System::Web::Configuration::ClientTarget ^ clientTarget);
public void Add(System.Web.Configuration.ClientTarget clientTarget);
member this.Add : System.Web.Configuration.ClientTarget -> unit
Public Sub Add (clientTarget As ClientTarget)
매개 변수
- clientTarget
- ClientTarget
ClientTarget 컬렉션에 추가할 개체입니다.
예제
다음 코드 예제에서는 컬렉션에 ClientTarget 개체를 추가합니다 ClientTargetCollection .
컬렉션을 가져오는 방법에 대한 자세한 내용은 클래스 개요의 코드 예제를 ClientTargetCollection 참조하세요.
// Create a new ClientTarget object.
clientTarget = new ClientTarget(
"my alias", "My User Agent");
// Add the clientTarget to
// the collection.
clientTargets.Add(clientTarget);
// Update the configuration file.
if (!clientTargetSection.IsReadOnly())
configuration.Save();
' Create a new ClientTarget object.
clientTarget = New ClientTarget( _
"my alias", "My User Agent")
' Add the clientTarget to
' the collection.
clientTargets.Add(clientTarget)
' Update the configuration file.
If Not clientTargetSection.IsReadOnly() Then
configuration.Save()
End If
설명
컬렉션에 클라이언트 대상을 추가하기 전에 개체를 ClientTarget 만들고 해당 AliasUserAgent 개체 및 속성을 초기화해야 합니다.