how to use "toString"

ssolid

Member
Licensed User
Longtime User
Basic4android - Core
this link is the keyword "tostring". please tell me how to use it(give me a example ) .thanks.
dim Wd as string
Wd = Location1.Latitude
it is not run.
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
You don't need toString for your example, Locations Latitude method returns it's result as a Double so you need:

B4X:
dim Wd as Double
Wd = Location1.Latitude

To answer your first question you would use toString something like this:

B4X:
Dim SB As StringBuilder
Dim Result As String

SB.Initialize
SB.Append("Build ").Append("a ").Append("string")
Result = SB.ToString
Log(Result)
 
Last edited:
Upvote 0
Top