Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions What is Null Coalescing Operator in NET 2 0



Null-Coalescing Operator in .NET 2.0

View(s): 12655

What is Null-Coalescing Operator in .NET 2.0?

Answer 1)


Usually we use ternary operator as below:

string name = null;
Console.WriteLine(name == null ? "No name" : name);

It is a replacement for ternary conditional operator ?:

string name = null;
Console.WriteLine(name ?? "No name");

  Asked in:  ProKarma   Expertise Level:  Intermediate
  Last updated on Sunday, 27 January 2013
4/5 stars (9 vote(s))

Register Login Ask Us Write to Us Help