if i dont initialize array size it will not work and i will be not knowing how much size i have to initialize
how to store values in string array
is my syntax below is correct
{
// Put user code to initialize the page here
int i=0;i=10;
string[] strarr;if(i==10){
strarr="firstvalue;
}
i=20;
if(i==20){
strarr="secondvalue";
}
i=30;
if(i==20){
strarr="thirdvalue";
}
i=40;
if(i==20){
strarr="fourth value";
}
foreach(string str in strarr){
Response.Write(str+"
");
}
}
so finally my code should display
firstvalue
secondvalue
thirdvalue
fourthvalue
Oscar RiveraPosted May 25, 2007, 3:01 PM
check this page: http://msdn2.microsoft.com/en-us/library/6sh2ey19.aspx
EdwardPosted May 25, 2007, 3:16 AM
It seems unclear to me. Could you put your error code snippet?