C# Method Expression-bodied Syntax

Please see my other Web articles.

Simplify single-statement methods

When writing methods with contain only a single statement, you can avoid curly braces and a return statement by using expression-bodied syntax.

Similar to lambda expression, append the “fat arrow” after the method signature and provide the single statement.

Note: Less space and code is required to perform a simple statement.