Code Help (C#)

Started by
16 comments, last by terranman 16 years, 1 month ago
Jared just una projecta. Ill send it when im done.
I should listen but I want to make this for some reason.
Advertisement
Why dosen't this work?

private void label3_Click(object sender, EventArgs e)
{
age.ToString();
label3.Text = age;
}
}
}
Quote:Original post by terranman
Why dosen't this work?

private void label3_Click(object sender, EventArgs e)
{
age.ToString();
label3.Text = age;
}
}
}


age.ToString() returns a string representation of age, it does not modify age itself. You want to be doing label3.Text = age.ToString();
Thanks man, how do you loop?
By the way I give people really high ratings when you help me a lot like you just did.
Quote:Original post by terranman
Thanks man, how do you loop?


There are different kinds of loops...

while(this is true)
{
do this
}


while x is less than 10 add 1 to x and execute the code
for(x = 1; x < 10; x++)
{
do this
}
Never mind all clear. Yipeeeeeeeeeeeeeeeeeeee!
Thanks though, its usefull.

This topic is closed to new replies.

Advertisement