Can i make arraylist array?
-
before my environment vs2005 C#.net and make web project now. while i was mad my code, i need to take some arraylist array. for example... defind arraylist array under the partial class ------------------------------------------------ public ArrayList[,] arFood = new ArrayList[4, 2]; and i use my button click event ------------------------------------------------ arFood[iMeal, 0].Add(CommonLib.IsNullString(myListItem.Value)); but while i was compiled source printed out error message. "System.NullReferenceException" .. so i was debug trace but myListItem.Value was not empty .. so my opinion, that's not initialize arraylist array. how can i initalize my arraylist array? or it's wrong code ? thanks for read my question...
.. knodark
-
before my environment vs2005 C#.net and make web project now. while i was mad my code, i need to take some arraylist array. for example... defind arraylist array under the partial class ------------------------------------------------ public ArrayList[,] arFood = new ArrayList[4, 2]; and i use my button click event ------------------------------------------------ arFood[iMeal, 0].Add(CommonLib.IsNullString(myListItem.Value)); but while i was compiled source printed out error message. "System.NullReferenceException" .. so i was debug trace but myListItem.Value was not empty .. so my opinion, that's not initialize arraylist array. how can i initalize my arraylist array? or it's wrong code ? thanks for read my question...
.. knodark
if (arFood[iMeal,0] == null) arFood[iMeal, 0] = new ArrayList() Why would you use an array list and not a generic list ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
if (arFood[iMeal,0] == null) arFood[iMeal, 0] = new ArrayList() Why would you use an array list and not a generic list ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
thaks for your reply. i was forgot it. :) it just use temporary memorize during finish user job. well... generic list is light more than arraylist array? .............. append... wow.. that's more short code... :) i was change generic list array :) tanks for your reply... -- modified at 3:27 Tuesday 13th November, 2007
.. knodark
-
if (arFood[iMeal,0] == null) arFood[iMeal, 0] = new ArrayList() Why would you use an array list and not a generic list ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )