unitytips: Expression body definition
27/08/2019
When you have a single line method, you can use expression body definition do simplify and reduce the lines of code:

Expression body definitions for methods and read-only properties are supported starting with C# 6. Expression body definitions for constructors, finalizers, property accessors, and indexers are supported starting with C# 7.0.
So you can use the expression body definition for other members, like properties:

Loading comments...