C# type inference of a generic method type parameter where the method has no arguments?

How about writing var people = repository.Find() It's saving the same amount of typing but in a different way.

How about writing var people = repository.Find(); It's saving the same amount of typing but in a different way.

You can't. Unfortunately C#'s generic method overload resolution doesn't match based on return values. See Eric Lippert's blog post about it: C# 3.0 Return Type Inference Does Not Work On Method Groups But one easy way to write this is using var keyword.

Var employees = repository.Find().

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions