Answers for "switch case ejemplos c# multiple conditions string"

C#
6

switch expression c# multiple cases

var switchValue = 3;
var resultText = switchValue switch
{
    1 or 2 or 3 => "one, two, or three",
    4 => "four",
    5 => "five",
    _ => "unknown",
};
Posted by: Guest on March-07-2021

C# Answers by Framework

Browse Popular Code Answers by Language