I have a list(string) with members in the form of 'label,location'; labels are distinct. I need a method which accepts a label parameter and retus a location.
I can iterate through using foreach to find the correct label, then manipulate the list member using Split to retu the location. However I'm sure there's a better way, presumably using LINQ, along the lines of
retu theList.Single(x => x == theLabel);
This doesn't work however since the list values == label,location.
