CodeNamespaceImportCollection.AddRange(CodeNamespaceImport[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a set of CodeNamespaceImport objects to the collection.
public:
void AddRange(cli::array <System::CodeDom::CodeNamespaceImport ^> ^ value);
public void AddRange (System.CodeDom.CodeNamespaceImport[] value);
member this.AddRange : System.CodeDom.CodeNamespaceImport[] -> unit
Public Sub AddRange (value As CodeNamespaceImport())
Parameters
- value
- CodeNamespaceImport[]
An array of type CodeNamespaceImport that contains the objects to add to the collection.
Exceptions
value
is null
.
Examples
The following example demonstrates how to use the AddRange method to add the members of a CodeNamespaceImport array to a CodeNamespaceImportCollection.
// Adds an array of CodeNamespaceImport objects to the collection.
array<CodeNamespaceImport^>^ Imports = {
gcnew CodeNamespaceImport( "System" ),
gcnew CodeNamespaceImport( "System.Drawing" )};
collection->AddRange( Imports );
// Adds an array of CodeNamespaceImport objects to the collection.
CodeNamespaceImport[] Imports = {
new CodeNamespaceImport("System"),
new CodeNamespaceImport("System.Drawing") };
collection.AddRange( Imports );
' Adds an array of CodeNamespaceImport objects to the collection.
Dim [Imports] As CodeNamespaceImport() = _
{New CodeNamespaceImport("System"), _
New CodeNamespaceImport("System.Drawing")}
collection.AddRange([Imports])
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.