Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# ternary operator

static void Sample(string input)
{
    string result = input == null ? "default" : input;
    Console.WriteLine($"Result: {result}");
}
Source by devarama.com #
 
PREVIOUS NEXT
Tagged: #ternary #operator
ADD COMMENT
Topic
Name
6+6 =