public class Worker { 
public int DoWork() { return 10; } 
public string DoWork() { return "Work"; } 
} 
public class Program 
{ 
public Program() 
{ 
Worker worker = new Worker; 
int workInt = worker.DoWork(); 
string workString = worker.DoWork(); 
}} 

 

 I know I know

 

But in 2010 a compiler should be intelligent enough, right?

 

Maybe I should put this in the c# 5.0 wishlist.