I just wonder how to write a number that has to be expressed as string.
For instance:
if (SelectedItem.Value == 0.ToString()) ...
or
if (SelectedItem.Value == "0") ...
or
public const string ZeroNumber = "0";
if (SelectedItem.Value == _zeroNumber) ...
or
if (Int.Parse(SelectedItem.Value) == 0)
For a single test, I’d personally go with
It has no fuss, no ceremony – it says exactly what you’re trying to do.
On the other hand, if I have a value which should be a number, and then I’ll react based on that number, I’d use: