Casting from string to an integer in VB.NET
Not all types can be casted to other types. If you attempt to illegally cast a type, you will get an error message informing you that the cast is illegal. In VB.NET, explicit casting can be used via the CType function. The syntax is as follows:
VariableOfTypeConvertToType = CType(ObjectToCast, ConvertToType)
VariableOfTypeConvertToType = CType(ObjectToCast, ConvertToType)

0 Comments:
Post a Comment
<< Home