CodeNamespaceImportCollection 클래스

정의

CodeNamespaceImport 개체의 컬렉션을 나타냅니다.

public ref class CodeNamespaceImportCollection : System::Collections::IList
public class CodeNamespaceImportCollection : System.Collections.IList
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeNamespaceImportCollection : System.Collections.IList
type CodeNamespaceImportCollection = class
    interface ICollection
    interface IEnumerable
    interface IList
type CodeNamespaceImportCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeNamespaceImportCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class CodeNamespaceImportCollection
Implements IList
상속
CodeNamespaceImportCollection
특성
구현

예제

다음 예제에서는 클래스의 일부 멤버를 보여 줍니다 CodeNamespaceImportCollection . 이 예제에서는 클래스의 새 instance 초기화하고, 클래스에 개체를 추가하고CodeNamespaceImport, 컬렉션의 총 개체 수를 가져옵니다.

// Creates an empty CodeNamespaceImportCollection.
CodeNamespaceImportCollection^ collection =
   gcnew CodeNamespaceImportCollection;

// Adds a CodeNamespaceImport to the collection.
collection->Add( gcnew CodeNamespaceImport( "System" ) );

// Adds an array of CodeNamespaceImport objects to the collection.
array<CodeNamespaceImport^>^ Imports = {
   gcnew CodeNamespaceImport( "System" ),
   gcnew CodeNamespaceImport( "System.Drawing" )};
collection->AddRange( Imports );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;
// Creates an empty CodeNamespaceImportCollection.
CodeNamespaceImportCollection collection =
    new CodeNamespaceImportCollection();            			

// Adds a CodeNamespaceImport to the collection.
collection.Add( new CodeNamespaceImport("System") );

// Adds an array of CodeNamespaceImport objects to the collection.
CodeNamespaceImport[] Imports = {
        new CodeNamespaceImport("System"),
        new CodeNamespaceImport("System.Drawing") };
collection.AddRange( Imports );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;
' Creates an empty CodeNamespaceImportCollection.
Dim collection As New CodeNamespaceImportCollection()

' Adds a CodeNamespaceImport to the collection.
collection.Add(New CodeNamespaceImport("System"))

' Adds an array of CodeNamespaceImport objects to the collection.
Dim [Imports] As CodeNamespaceImport() = _
    {New CodeNamespaceImport("System"), _
    New CodeNamespaceImport("System.Drawing")}
collection.AddRange([Imports])

' Retrieves the count of the items in the collection.
Dim collectionCount As Integer = collection.Count

설명

클래스는 CodeNamespaceImportCollection 개체 집합 CodeNamespaceImport 을 저장하는 데 사용할 수 있는 간단한 컬렉션 개체를 제공합니다.

생성자

CodeNamespaceImportCollection()

CodeNamespaceImportCollection 클래스의 새 인스턴스를 초기화합니다.

속성

Count

컬렉션의 네임스페이스 수를 가져옵니다.

Item[Int32]

컬렉션의 지정된 인덱스에 있는 CodeNamespaceImport 개체를 가져오거나 설정합니다.

메서드

Add(CodeNamespaceImport)

컬렉션에 CodeNamespaceImport 개체를 추가합니다.

AddRange(CodeNamespaceImport[])

CodeNamespaceImport 개체 집합을 컬렉션에 추가합니다.

Clear()

멤버의 컬렉션을 지웁니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetEnumerator()

컬렉션 멤버를 열거하는 열거자를 가져옵니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.CopyTo(Array, Int32)

특정 ICollection 인덱스부터 시작하여 Array의 요소를 Array에 복사합니다.

ICollection.Count

ICollection에 포함된 요소 수를 가져옵니다.

ICollection.IsSynchronized

ICollection에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지를 나타내는 값을 가져옵니다.

ICollection.SyncRoot

ICollection에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

IEnumerable.GetEnumerator()

컬렉션에서 반복할 수 있는 열거자를 반환합니다.

IList.Add(Object)

IList에 개체를 추가합니다.

IList.Clear()

IList에서 항목을 모두 제거합니다.

IList.Contains(Object)

IList에 특정 값이 들어 있는지 여부를 확인합니다.

IList.IndexOf(Object)

IList에서 특정 항목의 인덱스를 결정합니다.

IList.Insert(Int32, Object)

IList의 지정된 위치에 항목을 삽입합니다.

IList.IsFixedSize

IList의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다.

IList.IsReadOnly

IList가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

IList.Item[Int32]

지정한 인덱스에 있는 요소를 가져오거나 설정합니다.

IList.Remove(Object)

IList에서 맨 처음 발견되는 특정 개체를 제거합니다.

IList.RemoveAt(Int32)

IList의 지정된 인덱스에 있는 요소를 제거합니다.

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보