Simon Harriyott

New operator in C# 2.0

I've just come across a new C# operator in version 2.0, thanks to Oliver Sturm: the ?? operator.

It looks quite cool. I've stopped using ?: because it isn't as readable as an if .. then .. else. This might be useful, particularly if a single word could be used to describe it when reading. "Otherwise" is the best I can come up with at the moment, as in "bar = foo ?? 42" can be read "bar equals foo, otherwise 42". There's probably a better word though. Any suggestions?
26 July 2005