Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #switch #expression
ADD COMMENT
Topic
Name
8+2 =