While C# is better than Java, you can still run into traps because == sometimes means value-equality and sometimes means reference quality. I prefer it when they use separate operators.
Because they have never used a switch block before?
The best argument I have against String.Empty is that it isn't a constant. That means the compiler can't do certain optimizations that it could otherwise do. That especially means you can't use String.Empty anywhere where a constant is needed such as switch blocks or optional parameters.
1
u/[deleted] Jun 28 '10
While C# is better than Java, you can still run into traps because == sometimes means value-equality and sometimes means reference quality. I prefer it when they use separate operators.