CodeCommentStatementCollection.AddRange Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen CodeCommentStatement dizinin öğelerini koleksiyonun sonuna kopyalar.
Aşırı Yüklemeler
AddRange(CodeCommentStatement[]) |
Belirtilen CodeCommentStatement dizinin öğelerini koleksiyonun sonuna kopyalar. |
AddRange(CodeCommentStatementCollection) |
Başka bir CodeCommentStatementCollection nesnenin içeriğini koleksiyonun sonuna kopyalar. |
AddRange(CodeCommentStatement[])
Belirtilen CodeCommentStatement dizinin öğelerini koleksiyonun sonuna kopyalar.
public:
void AddRange(cli::array <System::CodeDom::CodeCommentStatement ^> ^ value);
public void AddRange (System.CodeDom.CodeCommentStatement[] value);
member this.AddRange : System.CodeDom.CodeCommentStatement[] -> unit
Public Sub AddRange (value As CodeCommentStatement())
Parametreler
- value
- CodeCommentStatement[]
Koleksiyona eklenecek nesneleri içeren tür CodeCommentStatement dizisi.
Özel durumlar
value
, null
değeridir.
Örnekler
Aşağıdaki örnekte, bir CodeCommentStatement dizinin üyelerini öğesine eklemek için yöntemi aşırı yüklemesinin nasıl kullanılacağı AddRange(CodeCommentStatement[]) gösterilmektedirCodeCommentStatementCollection.
// 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 );
// 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 );
' 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)
Ayrıca bkz.
Şunlara uygulanır
AddRange(CodeCommentStatementCollection)
Başka bir CodeCommentStatementCollection nesnenin içeriğini koleksiyonun sonuna kopyalar.
public:
void AddRange(System::CodeDom::CodeCommentStatementCollection ^ value);
public void AddRange (System.CodeDom.CodeCommentStatementCollection value);
member this.AddRange : System.CodeDom.CodeCommentStatementCollection -> unit
Public Sub AddRange (value As CodeCommentStatementCollection)
Parametreler
CodeCommentStatementCollection Koleksiyona eklenecek nesneleri içeren bir.
Özel durumlar
value
, null
değeridir.
Örnekler
Aşağıdaki örnekte, yöntem aşırı yüklemesinin AddRange(CodeCommentStatementCollection) bir üyeyi diğerine CodeCommentStatementCollection eklemek için nasıl kullanılacağı gösterilmektedir.
// 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 );
// 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 );
' 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)