DataTableMappingCollection.Clear 메서드

정의

컬렉션에서 모든 DataTableMapping 개체를 제거합니다.

public:
 virtual void Clear();
public void Clear ();
abstract member Clear : unit -> unit
override this.Clear : unit -> unit
Public Sub Clear ()

구현

예제

다음 예제에서는 메서드를 CopyTo 사용하여 컬렉션을 개체 배열 DataTableMapping 로 내보냅니다. 그런 다음 컬렉션을 지우고 매개 변수가 더 이상 지속되지 않는 경우 반환 true 합니다. 이 예제에서는 이미 만들어진 것으로 DataTableMappingCollection 가정합니다.

public void PushIntoArray()
{
    // ...
    // create DataTableMappingCollection collection mappings
    // ...
    DataTableMapping[] tables = {};
    mappings.CopyTo(tables, 0);
    mappings.Clear();
}
Public Sub PushIntoArray()
    ' ...
    ' create DataTableMappingCollection collection mappings
    ' ...
    Dim tables() As DataTableMapping
    mappings.CopyTo(tables, 0)
    mappings.Clear()
End Sub

적용 대상