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 示します。 この例では、クラスの新しいインスタンスを初期化し、それにオブジェクトを追加 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 に変換します。

適用対象

こちらもご覧ください