The following function uses a very long and complex type Long_complex_type
and it's hard to read. I tried to add parameter to the function but it doesn't work and var
doesn't support lambda expression. What's the best way to make the code more readable besides using-alias-directive
? (I don't want to create many type aliases, ideally the type can be inferred)
private void MyFunction()
{
Func<Long_complex_type> dowork = () => _service.GetSomething(.....);
Action<Long_complex_type> then = (Long_complex_type l) => { _view.DoSomething(l); };
.......
}