|
-
May 19th, 2013, 12:31 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Label text problem
Hi,
What am I doing wrong here:
Code:
Label1.Text = "The system will reboot in " + Reboot_Timer + " seconds, to finalize any settings..." + Environment.NewLine + Environment.NewLine + "Please standby!"
it's error says something about a double.....
-
May 19th, 2013, 12:37 PM
#2
Addicted Member
Re: Label text problem
Use & for concatenation, NOT +.
I assume Reboot_Timer is some numeric value...
vb.net Code:
Label1.Text = "The system will reboot in " & Reboot_Timer.toString & " seconds, to finalize any settings..." & Environment.NewLine & Environment.NewLine & "Please standby!"
-
May 19th, 2013, 12:45 PM
#3
Re: Label text problem
Actually if you use the correct operator, &, then the conversion is inferred and the explicit conversion is unnecessary, so the error wouldn't ever have arisen.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 19th, 2013, 01:01 PM
#4
Thread Starter
Hyperactive Member
-
May 19th, 2013, 01:23 PM
#5
Addicted Member
Re: Label text problem
 Originally Posted by dunfiddlin
Actually if you use the correct operator, &, then the conversion is inferred and the explicit conversion is unnecessary, so the error wouldn't ever have arisen.
That makes sense. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|