CType function returns the result of explicitly converting an expression to a specified data type.
Example:
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.LoadPublic Class Form1
Dim mStr As String = "100"
Dim mInt As Integer = CType(mStr, Integer) 'convert "100" string to mInt = 100 OK
mStr = "aaa"
mInt = CType(mStr, Integer) ' Error: Conversion from string "aaa" to type 'Integer' is not valid. NOK
End Sub
End Class