Hey guys, a while ago I decided I wanted to learn how to make actuall applications, so I decided to try C#.
I already had a reasonable amount of HTML, PHP, and SQL knowledge, so I thought it wouldn't be too hard.
Well, it isn't actually hard, but I can't seem to find what I'm looking for on Google.
How does one draw an integer, as DrawString only works for strings.
So, is there a way to directly draw an int, or do I have to convert it to a string first?
Are you talking about rendering with Graphics objects?
Indeed you need a string when rendering text. Converting numbers to textual representations is easy, for simple base 10, just do:
[cpp]
string text = Convert.ToString(123);
//'text' now contains "123"
[/cpp]
-snip-
Late
Easier still, use ToString.
[code]
int a = 24;
string b = a.ToString();
[/code]
Okay, I knew I could convert to string, but was wondering whether or not I had to convert, thanks guys!
[QUOTE=Hufterkruk;21053543]Okay, I knew I could convert to string, but was wondering whether or not I had to convert, thanks guys![/QUOTE]
what
[QUOTE=turb_;21065333]what[/QUOTE]
He didn't understand whether or not he had to convert it to a string before printing it into the form... makes sense to me.
Ahh, makes sense now. Thankyou.
[editline]03:54PM[/editline]
I read it retardly
Sorry, you need to Log In to post a reply to this thread.