CodeCommentStatementCollection.AddRange Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Копирует элементы указанного CodeCommentStatement массива в конец коллекции.
Перегрузки
| Имя | Описание |
|---|---|
| AddRange(CodeCommentStatement[]) |
Копирует элементы указанного CodeCommentStatement массива в конец коллекции. |
| AddRange(CodeCommentStatementCollection) |
Копирует содержимое другого CodeCommentStatementCollection объекта в конец коллекции. |
AddRange(CodeCommentStatement[])
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
Копирует элементы указанного CodeCommentStatement массива в конец коллекции.
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())
Параметры
- value
- CodeCommentStatement[]
Массив типа CodeCommentStatement , содержащий объекты, добавляемые в коллекцию.
Исключения
value равно null.
Примеры
В следующем примере показано, как использовать AddRange(CodeCommentStatement[]) перегрузку метода для добавления элементов массива CodeCommentStatement в объект CodeCommentStatementCollection.
// 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)
См. также раздел
Применяется к
AddRange(CodeCommentStatementCollection)
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
- Исходный код:
- CodeCommentStatementCollection.cs
Копирует содержимое другого CodeCommentStatementCollection объекта в конец коллекции.
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)
Параметры
Объект CodeCommentStatementCollection , содержащий объекты, добавляемые в коллекцию.
Исключения
value равно null.
Примеры
В следующем примере показано, как использовать перегрузку AddRange(CodeCommentStatementCollection) метода для добавления элементов одного CodeCommentStatementCollection к другому.
// 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)