I have a list of strings
List<string> lstOne = new List<string>() { "January:1", "February", "March:4"};
And I am filtering the strings that contain : with this code
var withcolumns = lstOne.Find(t => t.Contains(':'));
and I am getting a new list with { "January:1", "March:4"}
I want to select in a new list the values January:1 and March:4 but also save the indexes of then in the previous list so the result would be
“0” “January:1”
“2” “March:4”
I can be simple or complicated but right now my brain is not functioning to solve this issue.
1 Answer