Horje
c# switch case greater than Code Example
c# switch case greater than
int mark = 50;
switch (mark)
{
    case int n when n >= 80:
        Console.WriteLine("Grade is A");
        break;

    case int n when n >= 60:
        Console.WriteLine("Grade is B");
        break;

    case int n when n >= 40:
        Console.WriteLine("Grade is C");
        break;

    default:
        Console.WriteLine("Grade is D");
        break;
}




Csharp

Related
how to remove all whitespace from a string in c# Code Example how to remove all whitespace from a string in c# Code Example
how to pass optional guid parameters in c# Code Example how to pass optional guid parameters in c# Code Example
string substring c# before Code Example string substring c# before Code Example
flutter text left align Code Example flutter text left align Code Example
c# datagridview select row right click Code Example c# datagridview select row right click Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
14