Hi guys,
I'm having to translate some old VB code into C#, and I'm a bit stumped on this one set of statements. I don't need to know what the output string would be, just which route the code would take through this statement (and why!).
Select Case True
Case Not IsNumeric(strValue)
strValue = Format$(Now, "dd-mmm-yyyy")
Case CDbl(strValue) = 0
strValue = Format$(Now, "dd-mmm-yyyy")
Case Else
strValue = Format$(DateSerial(Left(strValue, 2), Mid(strValue, 3, 2), Right(strValue, 2)), "dd-mmm-yyyy")
End Select
The first two Case statements both return the same value regardless, so it makes no sense to me how I should really be translating this into C#. Any ideas?
Many thanks.