CodeCatchClauseCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
CodeCatchClause 개체의 컬렉션을 나타냅니다.
public ref class CodeCatchClauseCollection : System::Collections::CollectionBase
public class CodeCatchClauseCollection : System.Collections.CollectionBase
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeCatchClauseCollection : System.Collections.CollectionBase
type CodeCatchClauseCollection = class
inherit CollectionBase
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeCatchClauseCollection = class
inherit CollectionBase
Public Class CodeCatchClauseCollection
Inherits CollectionBase
- 상속
- 특성
예제
다음 예제에서는 클래스 메서드의 CodeCatchClauseCollection 사용을 보여 줍니다. 이 예제에서는 클래스의 새 instance 만들고 메서드를 사용하여 컬렉션에 문을 추가하고, 인덱스를 반환하고, 특정 인덱스 지점에서 특성을 추가하거나 제거합니다.
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection^ collection = gcnew CodeCatchClauseCollection;
// Adds a CodeCatchClause to the collection.
collection->Add( gcnew CodeCatchClause( "e" ) );
// Adds an array of CodeCatchClause objects to the collection.
array<CodeCatchClause^>^clauses = {gcnew CodeCatchClause,gcnew CodeCatchClause};
collection->AddRange( clauses );
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection^ clausesCollection = gcnew CodeCatchClauseCollection;
clausesCollection->Add( gcnew CodeCatchClause( "e",gcnew CodeTypeReference( System::ArgumentOutOfRangeException::typeid ) ) );
clausesCollection->Add( gcnew CodeCatchClause( "e" ) );
collection->AddRange( clausesCollection );
// Tests for the presence of a CodeCatchClause in the
// collection, and retrieves its index if it is found.
CodeCatchClause^ testClause = gcnew CodeCatchClause( "e" );
int itemIndex = -1;
if ( collection->Contains( testClause ) )
itemIndex = collection->IndexOf( testClause );
// Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection->CopyTo( clauses, 0 );
// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;
// Inserts a CodeCatchClause at index 0 of the collection.
collection->Insert( 0, gcnew CodeCatchClause( "e" ) );
// Removes the specified CodeCatchClause from the collection.
CodeCatchClause^ clause = gcnew CodeCatchClause( "e" );
collection->Remove( clause );
// Removes the CodeCatchClause at index 0.
collection->RemoveAt( 0 );
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection collection = new CodeCatchClauseCollection();
// Adds a CodeCatchClause to the collection.
collection.Add( new CodeCatchClause("e") );
// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause[] clauses = { new CodeCatchClause(), new CodeCatchClause() };
collection.AddRange( clauses );
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new CodeCatchClauseCollection();
clausesCollection.Add( new CodeCatchClause("e", new CodeTypeReference(typeof(System.ArgumentOutOfRangeException))) );
clausesCollection.Add( new CodeCatchClause("e") );
collection.AddRange( clausesCollection );
// Tests for the presence of a CodeCatchClause in the
// collection, and retrieves its index if it is found.
CodeCatchClause testClause = new CodeCatchClause("e");
int itemIndex = -1;
if( collection.Contains( testClause ) )
itemIndex = collection.IndexOf( testClause );
// Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection.CopyTo( clauses, 0 );
// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;
// Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert( 0, new CodeCatchClause("e") );
// Removes the specified CodeCatchClause from the collection.
CodeCatchClause clause = new CodeCatchClause("e");
collection.Remove( clause );
// Removes the CodeCatchClause at index 0.
collection.RemoveAt(0);
' Creates an empty CodeCatchClauseCollection.
Dim collection As New CodeCatchClauseCollection()
' Adds a CodeCatchClause to the collection.
collection.Add(New CodeCatchClause("e"))
' Adds an array of CodeCatchClause objects to the collection.
Dim clauses As CodeCatchClause() = {New CodeCatchClause(), New CodeCatchClause()}
collection.AddRange(clauses)
' Adds a collection of CodeCatchClause objects to the collection.
Dim clausesCollection As New CodeCatchClauseCollection()
clausesCollection.Add(New CodeCatchClause("e", New CodeTypeReference(GetType(System.ArgumentOutOfRangeException))))
clausesCollection.Add(New CodeCatchClause("e"))
collection.AddRange(clausesCollection)
' Tests for the presence of a CodeCatchClause in the
' collection, and retrieves its index if it is found.
Dim testClause As New CodeCatchClause("e")
Dim itemIndex As Integer = -1
If collection.Contains(testClause) Then
itemIndex = collection.IndexOf(testClause)
End If
' Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
' 'clauses' is a CodeCatchClause array.
collection.CopyTo(clauses, 0)
' Retrieves the count of the items in the collection.
Dim collectionCount As Integer = collection.Count
' Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert(0, New CodeCatchClause("e"))
' Removes the specified CodeCatchClause from the collection.
Dim clause As New CodeCatchClause("e")
collection.Remove(clause)
' Removes the CodeCatchClause at index 0.
collection.RemoveAt(0)
설명
클래스는 CodeCatchClauseCollection 개체 집합 CodeCatchClause 을 저장하는 데 사용할 수 있는 간단한 컬렉션 개체를 제공합니다.
생성자
| CodeCatchClauseCollection() |
CodeCatchClauseCollection 클래스의 새 인스턴스를 초기화합니다. |
| CodeCatchClauseCollection(CodeCatchClause[]) |
CodeCatchClauseCollection 개체의 지정된 배열을 포함하는 CodeCatchClause 클래스의 새 인스턴스를 초기화합니다. |
| CodeCatchClauseCollection(CodeCatchClauseCollection) |
지정된 소스 컬렉션의 요소를 포함하는 CodeCatchClauseCollection 클래스의 새 인스턴스를 초기화합니다. |
속성
| Capacity |
CollectionBase에 포함될 수 있는 요소의 수를 가져오거나 설정합니다. (다음에서 상속됨 CollectionBase) |
| Count |
CollectionBase 인스턴스에 포함된 요소 수를 가져옵니다. 이 속성은 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
| InnerList |
ArrayList 인스턴스의 요소 목록을 포함하는 CollectionBase를 가져옵니다. (다음에서 상속됨 CollectionBase) |
| Item[Int32] |
컬렉션의 지정된 인덱스에 있는 CodeCatchClause 개체를 가져오거나 설정합니다. |
| List |
IList 인스턴스의 요소 목록을 포함하는 CollectionBase를 가져옵니다. (다음에서 상속됨 CollectionBase) |
메서드
| Add(CodeCatchClause) |
지정된 CodeCatchClause 개체를 컬렉션에 추가합니다. |
| AddRange(CodeCatchClause[]) |
지정된 CodeCatchClause 배열의 요소를 컬렉션의 끝에 복사합니다. |
| AddRange(CodeCatchClauseCollection) |
다른 CodeCatchClauseCollection 개체의 내용을 컬렉션 끝에 복사합니다. |
| Clear() |
CollectionBase 인스턴스에서 개체를 모두 제거합니다. 이 메서드는 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
| Contains(CodeCatchClause) |
컬렉션에 지정된 CodeCatchClause 개체가 들어 있는지 여부를 나타내는 값을 가져옵니다. |
| CopyTo(CodeCatchClause[], Int32) |
지정한 인덱스에서 시작하는 1차원 Array 인스턴스에 컬렉션 개체를 복사합니다. |
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 확인합니다. (다음에서 상속됨 Object) |
| GetEnumerator() |
CollectionBase 인스턴스를 반복하는 열거자를 반환합니다. (다음에서 상속됨 CollectionBase) |
| GetHashCode() |
기본 해시 함수로 작동합니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type을 가져옵니다. (다음에서 상속됨 Object) |
| IndexOf(CodeCatchClause) |
컬렉션에 지정된 CodeCatchClause 개체가 있는 경우 해당 인덱스를 가져옵니다. |
| Insert(Int32, CodeCatchClause) |
지정된 CodeCatchClause 개체를 컬렉션의 지정된 인덱스에 삽입합니다. |
| MemberwiseClone() |
현재 Object의 단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| OnClear() |
CollectionBase 인스턴스의 콘텐츠를 지운 후에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnClearComplete() |
CollectionBase 인스턴스의 내용을 지운 후에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnInsert(Int32, Object) |
CollectionBase 인스턴스에 새 요소를 삽입하기 전에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnInsertComplete(Int32, Object) |
CollectionBase 인스턴스에 새 요소를 삽입한 후에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnRemove(Int32, Object) |
CollectionBase 인스턴스에서 요소를 제거할 때 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnRemoveComplete(Int32, Object) |
CollectionBase 인스턴스에서 요소를 제거한 후에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnSet(Int32, Object, Object) |
CollectionBase 인스턴스에 값을 설정하기 전에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnSetComplete(Int32, Object, Object) |
CollectionBase 인스턴스에 값을 설정한 후에 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnValidate(Object) |
값의 유효성을 검사할 때 추가로 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| Remove(CodeCatchClause) |
컬렉션에서 지정된 CodeCatchClause 개체를 제거합니다. |
| RemoveAt(Int32) |
CollectionBase 인스턴스의 지정한 인덱스에서 요소를 제거합니다. 이 메서드는 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |
명시적 인터페이스 구현
확장 메서드
| Cast<TResult>(IEnumerable) |
IEnumerable의 요소를 지정된 형식으로 캐스팅합니다. |
| OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable의 요소를 필터링합니다. |
| AsParallel(IEnumerable) |
쿼리를 병렬화할 수 있도록 합니다. |
| AsQueryable(IEnumerable) |
IEnumerable을 IQueryable로 변환합니다. |