VB.NET - Convert String value into Sysyem.datatype

Asked By koteswara rao arvapalli on 10-Sep-13 05:34 AM
 

 How to convert string value into system data type

  I have one string
 
 Dim str as string =dt.rows("columnname").tostring()

  out put  ::
 
str= "Integer" (or)
str= "String" (or)
str= "Double" (or)
str= "Decimal" (or)

I have problem when I assign that str to gettype

means gettype(str)


it shows error

please help thanks in advance?       
Robbe Morris replied to koteswara rao arvapalli on 10-Sep-13 08:16 AM
type.Parse is one way

double.TryParse("");

You can also look at the methods on the Convert class