Hi I'm not an expert in C# and I found this piece of code and don't really understand what it does.
I never saw the operator =>
in c# before. Is like a redirect?
public byte[] methodA(byte[] data) =>
this.methodB(data);
That's called an expression bodied method. It's new in C# 6.0.
It's equivalent to:
public byte[] methodA(byte[] data) {
return this.methodB(data);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With