I am having below class which contains some records :
public class File
{
public string Name { get; set; }
public List<Coordinates> Coordinates { get; set; }
}
Now this Name contains string like below:
1st record : "TestFile-Dump3.xlsx.sheet1,TestFile-Dump2.xlsx.sheet,TestFile-Dump1.xlsx.sheet1",
2nd record : "TestFile-Dump2.xlsx.sheet1",
3rd record : "TestFile-Dump2.xlsx.sheet3,TestFile-Dump1.xlsx.sheet5"
Suppose my current file name is : TestFile-Dump3.xlsx.sheet1
var list = List<File>();
var File = list.FirstOrDefault(ls => ls.Name == "TestFile-Dump3.xlsx.sheet1"); //null
I want to find list of co-ordinates for above file name only but when i try to find i am getting null for file TestFile-Dump3.xlsx.sheet1.
Can anybody tell me what is the problem and how to do this with linq???