1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
public class test { public static void TestOfNullConditionalOperator() { string s = "Test"; if (s ?. Length > 0) { s = "Test"; } if (System . Reflection . Assembly . GetEntryAssembly() ?. GetName() != null) { s = "Test"; } } }