When I wrote this code:
Dim theString As String = "3.14"
Dim theDouble As Double = CType( theString, Double )
I get a
Type mismatch error. Expected Double but got String message.
Double conversion supported by CTtype() in the first place?
If not, then we really need a double entry table in the documentation that clarifies, once and for all, if a conversion from typeA to typeB is supported or not.
I believe the doc page notes that CType only converts between types that can be implicitly converted.
Since you cannot implicitly convert a String to a Double, then you cannot do it with CType either.
Once being told and after rereading the documentation, I now understand that.
Your post above explicitely explains it, while the documentation states it… implicitely.
Actually the most confusing mention is the syntax table and the "Any"s in the “Type” column.
Yeah, I’ll see if I can make that clearer.