.NET

Reply
*Dale Levesque
Message 1 of 5 (65 Views)

Add method

65 Views, 4 Replies
10-14-2005 08:19 AM
Is there a simple way to initialize an array list with several items rather
than using the add method for each item? In the following example it would
be nice to add all items with one add call.

fa_FrenchDoors.Add("FDOR")

fa_FrenchDoors.Add("FPAR")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAEL")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("FAER")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("BDE2")
*Tony Tanzillo
Message 2 of 5 (65 Views)

Re: Add method

10-14-2005 09:11 AM in reply to: *Dale Levesque
ArrayList a = new ArrayList(new string[] {"a", "b", "c"});


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message news:4984952@discussion.autodesk.com...
Is there a simple way to initialize an array list with several items rather
than using the add method for each item? In the following example it would
be nice to add all items with one add call.

fa_FrenchDoors.Add("FDOR")

fa_FrenchDoors.Add("FPAR")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAEL")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("FAER")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("BDE2")
*Dale Levesque
Message 3 of 5 (65 Views)

Re: Add method

10-14-2005 09:13 AM in reply to: *Dale Levesque
Excellent.

"Tony Tanzillo" wrote in message
news:4985046@discussion.autodesk.com...
ArrayList a = new ArrayList(new string[] {"a", "b", "c"});


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:4984952@discussion.autodesk.com...
Is there a simple way to initialize an array list with several items rather
than using the add method for each item? In the following example it would
be nice to add all items with one add call.

fa_FrenchDoors.Add("FDOR")

fa_FrenchDoors.Add("FPAR")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAEL")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("FAER")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("BDE2")
*Dale Levesque
Message 4 of 5 (65 Views)

Re: Add method

10-14-2005 09:28 AM in reply to: *Dale Levesque
Just having abit of trouble converting to VB .net though : ) I'm assuming
this is C# Tony?

"Tony Tanzillo" wrote in message
news:4985046@discussion.autodesk.com...
ArrayList a = new ArrayList(new string[] {"a", "b", "c"});


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:4984952@discussion.autodesk.com...
Is there a simple way to initialize an array list with several items rather
than using the add method for each item? In the following example it would
be nice to add all items with one add call.

fa_FrenchDoors.Add("FDOR")

fa_FrenchDoors.Add("FPAR")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAEL")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("FAER")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("BDE2")
*Tony Tanzillo
Message 5 of 5 (65 Views)

Re: Add method

10-14-2005 09:42 AM in reply to: *Dale Levesque
According to reflector:

Dim a As New ArrayList( New String() {"a", "b", "c"} )


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message news:4985110@discussion.autodesk.com...
Just having abit of trouble converting to VB .net though : ) I'm assuming
this is C# Tony?

"Tony Tanzillo" wrote in message
news:4985046@discussion.autodesk.com...
ArrayList a = new ArrayList(new string[] {"a", "b", "c"});


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:4984952@discussion.autodesk.com...
Is there a simple way to initialize an array list with several items rather
than using the add method for each item? In the following example it would
be nice to add all items with one add call.

fa_FrenchDoors.Add("FDOR")

fa_FrenchDoors.Add("FPAR")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAEL")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("FAER")

fa_FrenchDoors.Add("FAES")

fa_FrenchDoors.Add("FAED")

fa_FrenchDoors.Add("BDE2")
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.