Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

: ? operator in c#

Object obj = null
//    is this condition true ? yes : no
var output = (obj == null) ? "Yes" : "No";

// output = "yes"
 
PREVIOUS NEXT
Tagged: #operator
ADD COMMENT
Topic
Name
4+8 =