I was looking at the following question, comparing casting to converting, which basically stated (Through all the answers), that if you know your object is a string, use (string)
rather than .ToString()
.
That got me thinking - what if your object might be a string or int? Or does knowing its a string also extend to integers?
Would this rule apply to a byte
too? (Accidently used bit
earlier)
Edit
This answer shows many ways of converting an integer to a string, but that still doesn't explain which to really use.