expressionbodied
Expression-bodied members are a feature in C# that allows for a more concise syntax when defining methods, properties, indexers, and operators that have a single expression as their body. This syntax, introduced in C# 6, uses an arrow token (`=>`) followed by the expression. The result of the expression is implicitly returned by the member.
For example, a simple method that returns a calculated value can be written using expression-bodied syntax.
The same principle applies to read-only properties and indexers. A property that simply returns the value of
The primary benefit of expression-bodied members is improved code readability and conciseness, especially for simple implementations.