Data Type Conversions

  • myString = myObject.ToString() [converts object to string]
  • myInteger = Int32.Parse(myString) [converts string to integer]
  • myBoolean = Int32.TryParse(myString, myInteger) [tries to convert string to integer, returns boolean]
  • myInteger = CInt(myObject) [converts various types to an integer]
  • myInteger = CInt(Math.Truncate(myDouble)) [cuts off fractional values and converts double to integer]
Was this article helpful?
0 out of 0 found this helpful