Thursday, September 10, 2015

two string array comparison in C# programmatically?string array comparisons?

string[] da=null;
string[] com=new string[50];


//Com stores value
for(int i=0;i<9;i++){
com[i]=i;
i++;
}


for (int i = 0; i < da.Length; i++)
                             {
 
                                 for (int j = 0; j < com.Length; j++)
                                 {
 
                                     if (da[i].ToString().Trim() != com[j].ToString().Trim())
 
                                     {
                                         ListItem itemsoft = new ListItem();
                                         itemsoft.Text = com[j];
                                         itemsoft.Value = com[j];
                                         chksoft.Items.Add(itemsoft);
                                     }
                                 }
                             }

No comments:

Post a Comment