I am using reflection to get an object\'s type, or for this issue an object that has instance properties type, at runtime and then I need to change an existing variable\'s t
Try Convert.ChangeType
If exp.Split(".").Count Then
Dim tp As Type = Nothing
tp = x.GetType
tp = tp.GetProperty(exp.Split(".").ElementAt(0)).PropertyType()
'Line below works, gets the right type, and now I need both x and y values passed in to be cast to this type.
Dim typ As Type = tp.GetType
x = Convert.ChangeType(x, typ)
End If