Switch Expressions - Switch Expressions - A New Feature in C# 8
Good news, now you can implement SWITCH in a new way. In C# 8, switch expressions are introduced, which implement a shorter syntax for returning a value. Here is the syntax of the SWITCH expression example: