I have this code that take a 2d array and turns them into strings to be written as a file, it checks 4 comboBoxes in the attempt to not write the line that has all 4 comboBox values. what is happening though is it is not writing any line with any of the combo box values. please help and thanks
if (grid[i][3] != comboBox4.Text && grid[i][0] != comboBox1.Text && grid[i][1] != comboBox2.Text
&& grid[i][2] != comboBox3.Text)
{
string gridstring = String.Join(",", grid[i]);
MessageBox.Show(gridstring);
tw.WriteLine(gridstring);
}
some example pseudo code
line1 = a,b,c,d
line1 = b,c,d,e
line1 = e,f,g,h
line1 = h,I,j,k
if line does not cantain a,b,c,d then write, so that only line 1 would not be written, but currenly it would skip the first 2