I would like to know how can I store data in an array. The reason is because I am required to loop through the array, in order to detect any multiple data.
I have the code and tested it to run through for any multiple data in array and it works, but that array does not contain data from database. Right now I really need to store the column data in the database. This is my code.
double[] array1; // store the sql column data here.
int count=0;
bool maxreached=false;
for(int i=0;i<array1.Length;i++)
{
if(array1[i]==text)
count++;
if(count>1)
{
maxreached=true;
break;
}
}
if(maxreached)
{
}
else
{
}