Click here to Skip to main content
15,921,622 members

Comments by Gerard Delower (Top 3 by date)

Gerard Delower 23-Jan-11 20:45pm View    
Hi All I worked out how to concatinate strings and variables in my form.cs
label1.Text = " Your machine has been up for " + span.Days + " Days A reboot is recomended";
I cheated by putting the the wmi call function in the form.cs ,now as a learning process I want to pass the variable span.days from my program.cs to the form.cs and not have the function twice
cheers Dene
Gerard Delower 20-Jan-11 23:12pm View    
Thanks Vipin, all I want is to display the variables value in the text form the label, the variable is in the program.cs
cheers Dene
Gerard Delower 20-Jan-11 23:10pm View    
Thanks Nishant and Yusuf for your suggestions, my span.days is a local variable in the program.cs when I declare "form1.DaysSpan = span.days;" it gives an error of course as it cant see the variable. Also how do I set the text for the label control as it's done in the form1 design window in the properties panel - programatically cheers Dene