The ip2nation table stores ip values like such:

IP      COUNTRY
687865856   za
689963008   eg


How does this translate into an actual IP address block range?


Question: Why can't the compiler infer this type argument from usage
Answer: I'm on the bus, so, short answer.

type inference of t requires knowing the formal parameter type of the delegate type in the argument.

conversion of the method group to the delegate type does overload resolution as though the method group was invoked with the arguments of the formal parameter types of the target delegate.

but those types are what we are trying to deduce!

this is circular reasoning, so type inference rejects it. A method group conversion requires that the formal parameter types be deduced from some other argument.

you have no other arguments.

so inference fails.

that the group contains only one method is irrelevant. It would be bizarre if adding more methods to the group caused inference to fail. The rule that a group of overloads is resolved through overload resolution is a sensible one, and that requires knowing the parameters. You don't get to run the inferences backwards just because a method group happens to be a singleton.

see the type inference tag on my msdn blog for a longer article on this topic.

http://blogs.msdn.com/b/ericlippert/archive/2007/11/05/c-3-0-return-type-inference-does-not-work-on-member-groups.aspx