CodeCommentStatementCollection Sınıf

Tanım

Nesne koleksiyonunu CodeCommentStatement temsil eder.

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

Örnekler

Aşağıdaki örnekte sınıf yöntemlerinin CodeCommentStatementCollection kullanımı gösterilmektedir. Örnek, sınıfının yeni bir örneğini oluşturur ve koleksiyona deyim eklemek, dizinlerini döndürmek ve belirli bir dizin noktasına öznitelik eklemek veya kaldırmak için yöntemlerini kullanır.

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

// Adds a CodeCommentStatement to the collection.
collection->Add( gcnew CodeCommentStatement( "Test comment" ) );

// Adds an array of CodeCommentStatement objects to the collection.
array<CodeCommentStatement^>^comments = {gcnew CodeCommentStatement( "Test comment" ),gcnew CodeCommentStatement( "Another test comment" )};
collection->AddRange( comments );

// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection^ commentsCollection = gcnew CodeCommentStatementCollection;
commentsCollection->Add( gcnew CodeCommentStatement( "Test comment" ) );
commentsCollection->Add( gcnew CodeCommentStatement( "Another test comment" ) );
collection->AddRange( commentsCollection );

// Tests for the presence of a CodeCommentStatement in the 
// collection, and retrieves its index if it is found.
CodeCommentStatement^ testComment = gcnew CodeCommentStatement( "Test comment" );
int itemIndex = -1;
if ( collection->Contains( testComment ) )
   itemIndex = collection->IndexOf( testComment );

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

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

// Inserts a CodeCommentStatement at index 0 of the collection.
collection->Insert( 0, gcnew CodeCommentStatement( "Test comment" ) );

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement^ comment = gcnew CodeCommentStatement( "Test comment" );
collection->Remove( comment );

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

// Adds a CodeCommentStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment") );

// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement[] comments = { new CodeCommentStatement("Test comment"), new CodeCommentStatement("Another test comment") };
collection.AddRange( comments );

// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new CodeCommentStatementCollection();
commentsCollection.Add( new CodeCommentStatement("Test comment") );
commentsCollection.Add( new CodeCommentStatement("Another test comment") );
collection.AddRange( commentsCollection );

// Tests for the presence of a CodeCommentStatement in the
// collection, and retrieves its index if it is found.
CodeCommentStatement testComment = new CodeCommentStatement("Test comment");
int itemIndex = -1;
if( collection.Contains( testComment ) )
    itemIndex = collection.IndexOf( testComment );

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

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

// Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment") );

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement comment = new CodeCommentStatement("Test comment");
collection.Remove( comment );

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

' Adds a CodeCommentStatement to the collection.
collection.Add(New CodeCommentStatement("Test comment"))

' Adds an array of CodeCommentStatement objects to the collection.
Dim comments As CodeCommentStatement() = {New CodeCommentStatement("Test comment"), New CodeCommentStatement("Another test comment")}
collection.AddRange(comments)

' Adds a collection of CodeCommentStatement objects to the 
' collection.
Dim commentsCollection As New CodeCommentStatementCollection()
commentsCollection.Add(New CodeCommentStatement("Test comment"))
commentsCollection.Add(New CodeCommentStatement("Another test comment"))
collection.AddRange(commentsCollection)

' Tests for the presence of a CodeCommentStatement in the 
' collection, and retrieves its index if it is found.
Dim testComment As New CodeCommentStatement("Test comment")
Dim itemIndex As Integer = -1
If collection.Contains(testComment) Then
    itemIndex = collection.IndexOf(testComment)
End If

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

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

' Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test comment"))

' Removes the specified CodeCommentStatement from the collection.
Dim comment As New CodeCommentStatement("Test comment")
collection.Remove(comment)

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

Açıklamalar

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

Oluşturucular

CodeCommentStatementCollection()

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

CodeCommentStatementCollection(CodeCommentStatement[])

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

CodeCommentStatementCollection(CodeCommentStatementCollection)

Belirtilen kaynak koleksiyonun CodeCommentStatementCollection öğ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]

Nesneyi koleksiyonda CodeCommentStatement belirtilen dizinde alır veya ayarlar.

List

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

(Devralındığı yer: CollectionBase)

Yöntemler

Add(CodeCommentStatement)

Belirtilen CodeCommentStatement nesneyi koleksiyona ekler.

AddRange(CodeCommentStatement[])

Belirtilen CodeCommentStatement dizinin öğelerini koleksiyonun sonuna kopyalar.

AddRange(CodeCommentStatementCollection)

Başka bir CodeCommentStatementCollection nesnenin içeriğini koleksiyonun sonuna kopyalar.

Clear()

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

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

Koleksiyonun belirtilen CodeCommentStatement nesneyi içerip içermediğini gösteren bir değer alır.

CopyTo(CodeCommentStatement[], Int32)

Koleksiyon nesnelerini belirtilen dizinden başlayarak belirtilen tek boyutluya Array 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(CodeCommentStatement)

Koleksiyonda varsa, koleksiyonda belirtilen CodeCommentStatement nesnenin dizinini alır.

Insert(Int32, CodeCommentStatement)

Belirtilen dizindeki koleksiyona bir CodeCommentStatement nesne 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(CodeCommentStatement)

Belirtilen CodeCommentStatement nesneyi 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.