two string array matching in c sharp
how to check two string array matching
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gomathi PalaniswamyPosted Sep 28, 2010, 6:25 AM
By the below coding you can get unique string from array a.
string[] a = new string[] { "a","b","c","d" };
string[] b = new string[] { "a","f","c","d" };
for (int i = 0; i < a.Length ; i++)
{
for (int j = 0; j < b.Length ; j++)
{
if (i != j)
{
if (a[i] == a[j])
{
a[i] = "";
j = j + 4;
}
}
if (a[i] == b[j])
{
a[i] = "";
j = j + 4;
}
}
}
With Regards,
Gomathi.P
Manikavelu VelayuthamPosted Sep 28, 2010, 5:36 AM
In this link you can download the source code to achieve your goal
vishnu krishnanPosted Sep 28, 2010, 5:18 AM
Manikavelu VelayuthamPosted Sep 28, 2010, 5:02 AM