Android Question Text not showing - Error Message

Ksmith1192

Member
Licensed User
Longtime User
Hi Guys,

I have this program that has two doubles declared "rightside" and "leftside"

They are only numbers, and I want them to be listed as (if left = 1 and right = 4) 1-4.

So I try to put in this line of code
Resultslbl.Text = LeftSide + "-" + RightSide

It errors every time. So how do I get it to show the text with the Leftside number with a - inbetween the Rightside number?

Thanks guys!
 

skaliwag

Member
Licensed User
Longtime User
To add strings together you use the '&' sign not the '+' sign.

So you should try
Resultslbl.Text = LeftSide & "-" & RightSide
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…