Hello friends,
I done a small program which i pasted below iam getting error in this line if(fail.Length =3). I dono how to get the array values size not length.So please me....
string[] a=new string[5];
By using Length method we can get length ie 6 as a output...But if i stored three string values how to get that value number...
Please help me out.....
<%
String Result="hello dude nvo what is ur problem nvo match today is it vow nvo match for its gud ya k then nvo entries";
int[] Resultt = new int[6];
string[] pass =new string[6];
string[] fail =new string[6];
String a = "available";
String b="unavailable";
string[] datas = new string[]
{
"no",
"no match",
"no match for",
"no entries",
};
for(int i = 0; i <= 3; i++)
{
Resultt[i] = Result.IndexOf(datas[i]);
}
for (int i = 0; i <= 3; i++)
{
if (Resultt[i] != -1)
{
//Response.Write("available");
for(int j=0; j<=3; j++)
{
pass[j] = a;
}
}
else
{
//Response.Write("unavailable");
for(int k=0; k<=3; k++)
{
fail[k] = b;
}
}
if(fail.GetLength =3)
//if(fail.Length =3)
//if(sizeof(fail) =3)
{
Response.Write("unavailable");
}
else
{
Response.Write("available");
}
}
%>