9
Answers

if List contains is null

diamond diamond

diamond diamond

11y
1.5k
1
 
Hi all,

If I want to say history list was null matrix [][] be 0, How could be written?
the code blew gives an error.

List <List<string> > history = new List <List<string>>()  ;
 int [][] matrix= new int[5][];

if (history[y].Contains("192.168.2.160", StringComparer.OrdinalIgnoreCase))
                        matrix[x+4][y] = 1;
else if (history[y].Contains==null)
                        matrix[x][y] = 0;


thanks

Answers (9)