CodeNamespaceImportCollection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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 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
type CodeNamespaceImportCollection = class
interface ICollection
interface IEnumerable
interface IList
Public Class CodeNamespaceImportCollection
Implements IList
- 継承
-
CodeNamespaceImportCollection
- 属性
- 実装
例
次の例では、 CodeNamespaceImportCollection クラスのメンバーの一部を示します。 この例では、クラスの新しいインスタンスを初期化し、 CodeNamespaceImport オブジェクトを追加し、コレクション内のオブジェクトの合計数を取得します。
// 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の指定したインデックス位置にある要素を削除します。 |
拡張メソッド
| 名前 | 説明 |
|---|---|
| AsParallel(IEnumerable) |
クエリの並列化を有効にします。 |
| AsQueryable(IEnumerable) |
IEnumerable を IQueryableに変換します。 |
| Cast<TResult>(IEnumerable) |
IEnumerable の要素を指定した型にキャストします。 |
| OfType<TResult>(IEnumerable) |
指定した型に基づいて、IEnumerable の要素をフィルター処理します。 |