Is it possible to write an inline generic method? For example, how can I translate the below method into an inline delegate.
public TUser Current<TUser>() where TUser : User
{
return getCurrentUser() as TUser;
}
Even just being able to call
Func<User> userFunc = new Func<User>(Current<User>);
would be useful.