CodeTypeReferenceCollection Sınıf

Tanım

Nesne koleksiyonunu CodeTypeReference temsil eder.

public ref class CodeTypeReferenceCollection : System::Collections::CollectionBase
public class CodeTypeReferenceCollection : System.Collections.CollectionBase
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeTypeReferenceCollection : System.Collections.CollectionBase
type CodeTypeReferenceCollection = class
    inherit CollectionBase
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeTypeReferenceCollection = class
    inherit CollectionBase
Public Class CodeTypeReferenceCollection
Inherits CollectionBase
Devralma
CodeTypeReferenceCollection
Öznitelikler

Örnekler

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

// Adds a CodeTypeReference to the collection.
collection->Add( gcnew CodeTypeReference( bool::typeid ) );

// Adds an array of CodeTypeReference objects to the collection.
array<CodeTypeReference^>^references = {gcnew CodeTypeReference( bool::typeid ),gcnew CodeTypeReference( bool::typeid )};
collection->AddRange( references );

// Adds a collection of CodeTypeReference objects to the collection.
CodeTypeReferenceCollection^ referencesCollection = gcnew CodeTypeReferenceCollection;
referencesCollection->Add( gcnew CodeTypeReference( bool::typeid ) );
referencesCollection->Add( gcnew CodeTypeReference( bool::typeid ) );
collection->AddRange( referencesCollection );

// Tests for the presence of a CodeTypeReference in the 
// collection, and retrieves its index if it is found.
CodeTypeReference^ testReference = gcnew CodeTypeReference( bool::typeid );
int itemIndex = -1;
if ( collection->Contains( testReference ) )
   itemIndex = collection->IndexOf( testReference );

// Copies the contents of the collection, beginning at index 0, 
// to the specified CodeTypeReference array.
// 'references' is a CodeTypeReference array.
collection->CopyTo( references, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;

// Inserts a CodeTypeReference at index 0 of the collection.
collection->Insert( 0, gcnew CodeTypeReference( bool::typeid ) );

// Removes the specified CodeTypeReference from the collection.
CodeTypeReference^ reference = gcnew CodeTypeReference( bool::typeid );
collection->Remove( reference );

// Removes the CodeTypeReference at index 0.
collection->RemoveAt( 0 );
// Creates an empty CodeTypeReferenceCollection.
CodeTypeReferenceCollection collection = new CodeTypeReferenceCollection();

// Adds a CodeTypeReference to the collection.
collection.Add( new CodeTypeReference(typeof(bool)) );

// Adds an array of CodeTypeReference objects to the collection.
CodeTypeReference[] references = { new CodeTypeReference(typeof(bool)), new CodeTypeReference(typeof(bool)) };
collection.AddRange( references );

// Adds a collection of CodeTypeReference objects to the collection.
CodeTypeReferenceCollection referencesCollection = new CodeTypeReferenceCollection();
referencesCollection.Add( new CodeTypeReference(typeof(bool)) );
referencesCollection.Add( new CodeTypeReference(typeof(bool)) );
collection.AddRange( referencesCollection );

// Tests for the presence of a CodeTypeReference in the
// collection, and retrieves its index if it is found.
CodeTypeReference testReference = new CodeTypeReference(typeof(bool));
int itemIndex = -1;
if( collection.Contains( testReference ) )
    itemIndex = collection.IndexOf( testReference );

// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeReference array.
// 'references' is a CodeTypeReference array.
collection.CopyTo( references, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

// Inserts a CodeTypeReference at index 0 of the collection.
collection.Insert( 0, new CodeTypeReference(typeof(bool)) );

// Removes the specified CodeTypeReference from the collection.
CodeTypeReference reference = new CodeTypeReference(typeof(bool));
collection.Remove( reference );

// Removes the CodeTypeReference at index 0.
collection.RemoveAt(0);
' Creates an empty CodeTypeReferenceCollection.
Dim collection As New CodeTypeReferenceCollection()

' Adds a CodeTypeReference to the collection.
collection.Add(New CodeTypeReference(GetType(Boolean)))

' Adds an array of CodeTypeReference objects to the collection.
Dim references As CodeTypeReference() = {New CodeTypeReference(GetType(Boolean)), New CodeTypeReference(GetType(Boolean))}
collection.AddRange(references)

' Adds a collection of CodeTypeReference objects to the collection.
Dim referencesCollection As New CodeTypeReferenceCollection()
referencesCollection.Add(New CodeTypeReference(GetType(Boolean)))
referencesCollection.Add(New CodeTypeReference(GetType(Boolean)))
collection.AddRange(referencesCollection)

' Tests for the presence of a CodeTypeReference in the 
' collection, and retrieves its index if it is found.
Dim testReference As New CodeTypeReference(GetType(Boolean))
Dim itemIndex As Integer = -1
If collection.Contains(testReference) Then
    itemIndex = collection.IndexOf(testReference)
End If

' Copies the contents of the collection, beginning at index 0, 
' to the specified CodeTypeReference array.
' 'references' is a CodeTypeReference array.
collection.CopyTo(references, 0)

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

' Inserts a CodeTypeReference at index 0 of the collection.
collection.Insert(0, New CodeTypeReference(GetType(Boolean)))

' Removes the specified CodeTypeReference from the collection.
Dim reference As New CodeTypeReference(GetType(Boolean))
collection.Remove(reference)

' Removes the CodeTypeReference at index 0.
collection.RemoveAt(0)

Açıklamalar

sınıfı, CodeTypeReferenceCollection bir nesne kümesini CodeTypeReference depolamak için kullanılabilecek basit bir koleksiyon nesnesi sağlar.

Oluşturucular

CodeTypeReferenceCollection()

CodeTypeReferenceCollection sınıfının yeni bir örneğini başlatır.

CodeTypeReferenceCollection(CodeTypeReference[])

Belirtilen nesne dizisini CodeTypeReferenceCollection içeren sınıfının yeni bir örneğini CodeTypeReference başlatır.

CodeTypeReferenceCollection(CodeTypeReferenceCollection)

Belirtilen kaynak koleksiyonun CodeTypeReferenceCollection öğelerini içeren sınıfının yeni bir örneğini başlatır.

Özellikler

Capacity

öğesinin içerebileceği öğe CollectionBase sayısını alır veya ayarlar.

(Devralındığı yer: CollectionBase)
Count

Örnekte bulunan CollectionBase öğelerin sayısını alır. Bu özellik geçersiz kılınamaz.

(Devralındığı yer: CollectionBase)
InnerList

Örnekteki öğelerin CollectionBase listesini içeren bir ArrayList alır.

(Devralındığı yer: CollectionBase)
Item[Int32]

koleksiyonda CodeTypeReference belirtilen dizinde öğesini alır veya ayarlar.

List

Örnekteki öğelerin CollectionBase listesini içeren bir IList alır.

(Devralındığı yer: CollectionBase)

Yöntemler

Add(CodeTypeReference)

Belirtilen CodeTypeReference öğesini koleksiyona ekler.

Add(String)

Belirtilen veri türü adını kullanarak koleksiyona bir CodeTypeReference ekler.

Add(Type)

Belirtilen veri türünü kullanarak koleksiyona bir CodeTypeReference ekler.

AddRange(CodeTypeReference[])

Belirtilen CodeTypeReference dizinin öğelerini koleksiyonun sonuna kopyalar.

AddRange(CodeTypeReferenceCollection)

Belirtilen CodeTypeReferenceCollection öğesinin içeriğini koleksiyonun sonuna ekler.

Clear()

Örnekteki CollectionBase tüm nesneleri kaldırır. Bu yöntem geçersiz kılınamaz.

(Devralındığı yer: CollectionBase)
Contains(CodeTypeReference)

Koleksiyonun belirtilen CodeTypeReferenceöğesini içerip içermediğini belirten bir değer alır.

CopyTo(CodeTypeReference[], Int32)

Koleksiyondaki öğeleri belirtilen dizinde belirtilen tek boyutlu Array öğeye kopyalar.

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetEnumerator()

Örnekte yineleyen CollectionBase bir numaralandırıcı döndürür.

(Devralındığı yer: CollectionBase)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Type Geçerli örneğini alır.

(Devralındığı yer: Object)
IndexOf(CodeTypeReference)

Belirtilen koleksiyonunda varsa, dizinini belirtilen CodeTypeReferencekoleksiyonunda alır.

Insert(Int32, CodeTypeReference)

Belirtilen dizindeki koleksiyona bir CodeTypeReference ekler.

MemberwiseClone()

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

(Devralındığı yer: Object)
OnClear()

Örneğin içeriğini CollectionBase temizlerken ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnClearComplete()

Örneğin içeriğini CollectionBase temizledikten sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnInsert(Int32, Object)

Örneğe yeni bir öğe CollectionBase eklemeden önce ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnInsertComplete(Int32, Object)

Örneğe yeni bir öğe CollectionBase ekledikten sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnRemove(Int32, Object)

Bir öğeyi örnekten CollectionBase kaldırırken ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnRemoveComplete(Int32, Object)

Örnekten CollectionBase bir öğeyi kaldırdıktan sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnSet(Int32, Object, Object)

Örnekte bir değer CollectionBase ayarlamadan önce ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnSetComplete(Int32, Object, Object)

Örnekte bir değer CollectionBase ayarladıktan sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnValidate(Object)

Bir değeri doğrularken ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
Remove(CodeTypeReference)

Belirtilen CodeTypeReference öğesini koleksiyondan kaldırır.

RemoveAt(Int32)

Örneğin belirtilen dizinindeki CollectionBase öğesini kaldırır. Bu yöntem geçersiz kılınamaz.

(Devralındığı yer: CollectionBase)
ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.

(Devralındığı yer: Object)

Belirtik Arabirim Kullanımları

ICollection.CopyTo(Array, Int32)

Hedef dizinin belirtilen dizininden başlayarak tamamını CollectionBase uyumlu bir tek boyutlu Arrayöğesine kopyalar.

(Devralındığı yer: CollectionBase)
ICollection.IsSynchronized

erişimin CollectionBase eşitlenip eşitlenmediğini belirten bir değer alır (iş parçacığı güvenli).

(Devralındığı yer: CollectionBase)
ICollection.SyncRoot

erişimi CollectionBaseeşitlemek için kullanılabilecek bir nesnesi alır.

(Devralındığı yer: CollectionBase)
IList.Add(Object)

sonuna bir nesne CollectionBaseekler.

(Devralındığı yer: CollectionBase)
IList.Contains(Object)

öğesinin CollectionBase belirli bir öğe içerip içermediğini belirler.

(Devralındığı yer: CollectionBase)
IList.IndexOf(Object)

Belirtilen Object öğesini arar ve tüm CollectionBaseiçindeki ilk oluşumun sıfır tabanlı dizinini döndürür.

(Devralındığı yer: CollectionBase)
IList.Insert(Int32, Object)

Belirtilen dizinde öğesine CollectionBase bir öğe ekler.

(Devralındığı yer: CollectionBase)
IList.IsFixedSize

değerinin sabit bir boyuta sahip olup olmadığını CollectionBase belirten bir değer alır.

(Devralındığı yer: CollectionBase)
IList.IsReadOnly

CollectionBase öğesinin salt okunur olup olmadığını belirten bir değer alır.

(Devralındığı yer: CollectionBase)
IList.Item[Int32]

Belirtilen dizindeki öğeyi alır veya ayarlar.

(Devralındığı yer: CollectionBase)
IList.Remove(Object)

Belirli bir nesnenin ilk oluşumunu öğesinden CollectionBasekaldırır.

(Devralındığı yer: CollectionBase)

Uzantı Metotları

Cast<TResult>(IEnumerable)

öğesinin IEnumerable öğelerini belirtilen türe atar.

OfType<TResult>(IEnumerable)

Bir öğesinin IEnumerable öğelerini belirtilen türe göre filtreler.

AsParallel(IEnumerable)

Sorgunun paralelleştirilmesini sağlar.

AsQueryable(IEnumerable)

bir IEnumerable öğesini öğesine IQueryabledönüştürür.

Şunlara uygulanır

Ayrıca bkz.