Tied to the Train Tracks
by in CodeSOD on 2023-03-23Ah, the joys of stringly typed code. Everything can be turned into a string, so why not treat everything as a string? It certainly worked for Sebastian's co-worker, who also took it to another level:
If GetTrainAtStation(aTrainNo.ToString) Is Nothing Then
iTheTrainAtStation.Add(String.Format("{0}", aTrainNo.ToString), aTrainAtStationItem)
End If