CodeTypeReferenceCollection.AddRange 方法

定义

将指定的 CodeTypeReference 数组的元素复制到集合末尾。

重载

AddRange(CodeTypeReference[])

将指定的 CodeTypeReference 数组的元素复制到集合末尾。

AddRange(CodeTypeReferenceCollection)

将指定 CodeTypeReferenceCollection 的内容添加到集合的末尾。

AddRange(CodeTypeReference[])

Source:
CodeTypeReferenceCollection.cs
Source:
CodeTypeReferenceCollection.cs
Source:
CodeTypeReferenceCollection.cs

将指定的 CodeTypeReference 数组的元素复制到集合末尾。

public:
 void AddRange(cli::array <System::CodeDom::CodeTypeReference ^> ^ value);
public void AddRange (System.CodeDom.CodeTypeReference[] value);
member this.AddRange : System.CodeDom.CodeTypeReference[] -> unit
Public Sub AddRange (value As CodeTypeReference())

参数

value
CodeTypeReference[]

CodeTypeReference 类型的数组,包含要添加到集合的对象。

例外

valuenull

示例

// 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 );
// 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 );
' 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)

另请参阅

适用于

AddRange(CodeTypeReferenceCollection)

Source:
CodeTypeReferenceCollection.cs
Source:
CodeTypeReferenceCollection.cs
Source:
CodeTypeReferenceCollection.cs

将指定 CodeTypeReferenceCollection 的内容添加到集合的末尾。

public:
 void AddRange(System::CodeDom::CodeTypeReferenceCollection ^ value);
public void AddRange (System.CodeDom.CodeTypeReferenceCollection value);
member this.AddRange : System.CodeDom.CodeTypeReferenceCollection -> unit
Public Sub AddRange (value As CodeTypeReferenceCollection)

参数

value
CodeTypeReferenceCollection

CodeTypeReferenceCollection,包含要添加到集合的对象。

例外

valuenull

示例

// 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 );
// 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 );
' 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)

另请参阅

适用于