Hi All,
I am trying to sort a List like this:
public void Example()
{
string target = "hello";
List<string> myStings = new List<string>();
myStings.Add("babab");
myStings.Add("Helll");
myStings.Add("atest");
myStings.OrderBy(each => Distance(each, target));
}
public int Distance(string stringA, string stringB)
{
// Whatever
}
The problem is that the list doesn't get ordered and the Distance method doesn't get fired (I put a breakpoint in there but doesn't get hit).
Any help appreciated!