Fun with C# 6.0 – ? Token And String interpolation

As we all know that, we can try to use C# 6.0 at Visual 2015 Preview CPT 4 , there are 2 very interesting features

– Null Propagation

we have 4 different ways to use ? token in C# 6, what’s the result of this statement?

//
  var b = ((bool?)null)?.Equals(false) ?? true ? false ? true : false :true;
//

– String interpolation (what is exactly my string in ”  “)

//
 string str = "\{ ("\{( "(\{ "{}" })" )}") }";
//

Leave a comment