Are all of these equal? Under what circumstances should I choose each over the others?
var.ToString()
CStr(var)
CType(var,
Cstr()
is compiled inline for better performance.
CType
allows for casts between types if a conversion operator is defined
ToString()
Between base type and string throws an exception if conversion is not possible.
TryParse()
From String to base typeif
possible otherwise returns false
DirectCast
used if the types are related via inheritance or share a common interface , will throw an exception if the cast is not possible, trycast
will return nothing in this instance