1

I am well aware about the "=>" being the lambda operator in c# and have used it a lot so far.

But today I stumbled upon a new way (for me, at least) of using this operator that I can't get my head around:

public abstract class Connection : IConnection
{
     protected HttpClient HttpClient { get; private set; }

     ...    

     public Uri Address => HttpClient.BaseAddress;

     public TimeSpan Timeout => HttpClient.Timeout;

     ...

}

I've checked => Operator (C# Reference) and Lambda Expressions (C# Programming Guide) but couldn't find any mention for this type of usage.

The code is from the MyCouch project on GitHub in this source file.

What am I missing?

Mihai Caracostea
  • 8,336
  • 4
  • 27
  • 46

0 Answers0