ISessionStateItemCollection.Remove(String) 메서드

정의

컬렉션에서 항목을 삭제합니다.

public:
 void Remove(System::String ^ name);
public void Remove (string name);
abstract member Remove : string -> unit
Public Sub Remove (name As String)

매개 변수

name
String

컬렉션에서 삭제할 항목의 이름입니다.

예제

다음 코드 예제에서는 Remove 메서드를 구현하는 방법을 보여 줍니다. 인터페이스의 전체 구현 ISessionStateItemCollection 예제는 인터페이스 개요에 제공된 예제를 ISessionStateItemCollection 참조하세요.

public void Remove(string name)
{
  pItems.Remove(name);
  pDirty = true;
}
Public Sub Remove(name As String) Implements ISessionStateItemCollection.Remove
  pItems.Remove(name)
  pDirty = True
End Sub

설명

메서드를 Remove 구현할 때 구현의 값 ISessionStateItemCollectionDirty 수정되었음을 나타내도록 true 속성을 설정해야 합니다.

구현에 ISessionStateItemCollection 지정된 name요소가 없는 경우 컬렉션은 변경되지 않고 예외가 throw되지 않아야 합니다.

적용 대상

추가 정보