diamond diamond

diamond diamond

  • NA
  • 133
  • 55.7k

if List contains is null

Aug 25 2013 1:05 PM
 
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)