.NET

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

Add method

61 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 (61 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 (61 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 (61 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 (61 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")

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community