private List <KeyValuePair <CellInfo, KeyValuePair <int, int> > > ParseCell(string cell, int i, int j) { var parts = cell.Replace("{", "").Replace("}", "").Split(','); if (parts.Length == 1) { var part = parts[0]; if (CellInfo.IgnoreCellString(part)) { return(null); } var cellInfo = new CellInfo(part); return(new List <KeyValuePair <CellInfo, KeyValuePair <int, int> > >() { new KeyValuePair <CellInfo, KeyValuePair <int, int> >(cellInfo, new KeyValuePair <int, int>(i, j)) }); } var result = new List <KeyValuePair <CellInfo, KeyValuePair <int, int> > >(); foreach (var part in parts) { if (part == "" || part == "*") { continue; } var cellInfo = new CellInfo(part); result.Add(new KeyValuePair <CellInfo, KeyValuePair <int, int> >(cellInfo, new KeyValuePair <int, int>(i, j))); } return(result); }