What does the => operator mean in a property?

I came across some code that said

public int MaxHealth => 
         Memory[Address].IsValid ? 
         Memory[Address].Read<int>(Offs.Life.MaxHp) : 
         0;

Now I am somewhat familiar with Lambda expressions. I just have not seen it used it this way.

What would be the difference between the above statement and

public int MaxHealth  = x ? y:z;

7 Answers
7

Leave a Comment