Convert a string to decimal in VB.NET

What will be the easiest way to convert a string to decimal?

Input:

a = 40000.00-

Output will be

40,000.00-

I tried to use this code:

Dim a as string

a = "4000.00-"

a = Format$(a, "#,###.##")
console.writeline (a)
10
задан Peter Mortensen 7 April 2012 в 22:57
поделиться