switch case c# range
int i = 63;
switch (i)
{
case int n when (n >= 100):
Console.WriteLine($"I am 100 or above: {n}");
break;
case int n when (n < 100 && n >= 50 ):
Console.WriteLine($"I am between 99 and 50: {n}");
break;
case int n when (n < 50):
Console.WriteLine($"I am less than 50: {n}");
break;
}
Also in C#:
- why is c# say ; expected
- c# write to console
- 2d movement unity
- how to redirect to extern page in .net core
- for each property in object c#
- unity instantiate an object
- uncaught syntaxerror invalid or unexpected token unity webgl
- Assets/Scripts/Snake.cs(187,10): error CS0029: Cannot implicitly convert type `UnityEngine.Vector2Int' to `System.Collections.Generic.List<UnityEngine.Vector2Int>'
- unity how to load up a scene
- how to pass object as test case in nunit c#
- for c#
- c# public static string
- unity set sprite transparency
- c# make string null
- c# function
- first sentence letter capital in c#
- loop over enum values
- unity custom editor save changes
- override Microsoft.AspNetCore.Authorization.AuthorizeAttribute
- percentage in c#
- get hash c#
- c sharp tryparse
- attribute usage c#
- unity next scene