csharp switch expression 8.0
Code Example - csharp switch expression 8.0
int num = 1;
string message = num switch{
1 => "The Fruits is red",
2 => "The Fruits is green",
3 => "The Fruits is blue"
};
// Message: The Fruits is red