I have often encountered an error such as \"cannot convert from \'method group\' to \'string\'\" in cases like:
var list = new List();
// ...
Also, if you are using LINQ, you can apparently do something like myList.Select(methodGroup).
So, for example, I have:
private string DoSomethingToMyString(string input)
{
// blah
}
Instead of explicitly stating the variable to be used like this:
public List GetStringStuff()
{
return something.getStringsFromSomewhere.Select(str => DoSomethingToMyString(str));
}
I can just omit the name of the var:
public List GetStringStuff()
{
return something.getStringsFromSomewhere.Select(DoSomethingToMyString);
}