I have Post The Code Compare Both String Value

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 676
//I have Post The Code Compare Both String Value

string str1= "/23/2/55/44/";
string str2 = "/2/55/67/8/99/";
string st3 = "";
st3 = str1 + str2;
int strsp = str1.Split('/').Length;
int strsp1 = str2.Split('/').Length;
string Tot = "";

for (int i = 0; i <= strsp - 1; i++)
{
string str12 = str1.Split('/')[i];
for (int j = 0; j <= strsp1-1; j++)
{
string str13 = str2.Split('/')[j];
if (str12 == str13)
{
Tot += str12;
}
}
}

Response.Write(Tot);

Comments or Responses

Login to post response