Get data type and convert data type

How do I detect the data type of a certain for example ‘if obj IsA String then…end if’? Also, how do I convert between data types? What is the equivelents of CType and Directcast in Xojo? Thanks.

ISA is for object types - strings are not objects

For simple data types (Integer, Double, String, etc.) you can use a Variant.

You cannot convert between unrelated objects (String is not an object). You can cast objects to other types based on the inheritance structure or through the use of interfaces.

To direct cast, use syntax like this

[quote]Dim db As Database
db = New SQLiteDatabase
SQLiteDatabase(db).MultiUser = True // Cast db to a SQLiteDatabase to access the MultiUser property[/quote]

[quote=44320:@Paul Lefebvre]For simple data types (Integer, Double, String, etc.) you can use a Variant.

You cannot convert between unrelated objects (String is not an object). You can cast objects to other types based on the inheritance structure or through the use of interfaces.

To direct cast, use syntax like this[/quote]
Thanks