Lambda expression vs expression-bodied methods

First off this is an amazing course, probably the best course I have taken. I am learning a lot from you; your programming skills far exceed mine, but I did notice something you said in the following code that was probably a slip of the tough :
public GridPosition GetGridPosition(Vector3 worldPosition)=> gridSystem.GetGridPosition(worldPosition); you referred to this as a Lamdba expression. I think you must have meant expression-bodied method because => in this situation does not represent a Lambda expression.

Yup that is correct, that is indeed the right technical term. For me I just always think of lambda when I see => but in that case it is a “expression bodied member”
I’m glad you’re enjoying the course! Thanks!

Privacy & Terms