Answers for "c# switch expression 8.0"

C#
0

c# 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
Posted by: Guest on April-26-2021

C# Answers by Framework

Browse Popular Code Answers by Language