Hi,
The ArrayList can store any reference types and boxed value types.
Here is another way:
ArrayList ArrMM=new ArrayList();
for(int j=1;j<=12;j++)
{
ArrMM.Add(j.ToString("00"));
}
The ArrMM will contain 12 strings "01", "02", ... "11", "12".
In your example, the ArrMM will contain 9 strings "01", "02" .. "09" and 3
boxed integers 10, 11, 12
--
Andrew Gnenny
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Vaj" <vi*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,
I'm attaching a code here.this code works successfully,
But my doubt is,
Can an arraylist store this integer value "J" as wellas string value "S"
ArrayList ArrMM=new ArrayList();
for(int j=1;j<=12;j++)
{if(j<10)
{string s="0" + j;ArrMM.Add(s);}
else {ArrMM.Add(j);} }
Can anyone help me for solving this problem?.
thanks,
Vaj.