Wow I can't remember

baron159

Member
Licensed User
Longtime User
Ok so I have a two part question. Ane let me start off by saying I have been programming in Microsoft Visual Basic for the past 3 months and I have forgot many of the different code types in B4A and I just started getting into the swing of things.

Q#1: How do I convert a Double to a String like in the following code?

dim num as Double

textbox.text = num

Q#2: In Visual Basic this is a conversion method that allows you to change any number to a string and into a currency. Is their a way to do this in B4A?

VBCODE:

dim num as Double = 2000

textbox.text = num.ToString("C2")

output is:
$2000.00

So sorry for the dumb question it's just that I forgot everything because I was in a different language.

Thanks Again:

-baron159
 

pluton

Active Member
Licensed User
Longtime User
Q#1: How do I convert a Double to a String like in the following code?

dim num as Double
textbox.text = num

Something like this. I write this from my mind because I didn't start B4A now

B4X:
Dim tstring As String
Dim num As Double

textbox.text = tstring
tstring = num
'something do with this double number

textbox2.text = ("Double is: " &num)
 
Upvote 0
Top