[ad_1]
You can use the ternary operator:
string test = "It's a test";
string test2 = (test != "") ? test : "0-length string";
5
[ad_2]
solved C# Shorten if statement
[ad_1]
You can use the ternary operator:
string test = "It's a test";
string test2 = (test != "") ? test : "0-length string";
5
[ad_2]
solved C# Shorten if statement