|
-
Apr 17th, 2002, 10:35 PM
#1
Thread Starter
Hyperactive Member
Convert number to string
hello,
how can i covert say 12 to a charater string "12"?
boy, i miss vb 
regan
-
Apr 17th, 2002, 10:48 PM
#2
Frenzied Member
never fear, c# is your friend
PHP Code:
private void Form1_Load(object sender, System.EventArgs e)
{
int mynumber =123456;
mynumber.ToString();
}
MOST OBJECTS IN C# HAVE .ToString();
-
Apr 18th, 2002, 06:32 AM
#3
Junior Member
or more accurately
Most objects in the .NET framework have .ToString
There is no difference between objects in any language under .NET.
cheers
Simon
-
May 14th, 2002, 10:02 AM
#4
Hyperactive Member
Well, you could also use System.Convert class to provide additional conversions. And I think (string)12 or 12.ToString() would also run, won't it?
-
May 14th, 2002, 10:22 AM
#5
Lively Member
or more accurately
All objects in the .NET framework have ToString.
ToString is a method of System.Object and all objects are finally derived from System.Object.
-
May 14th, 2002, 10:51 AM
#6
Junior Member
I stand corrected .. you are indeed right.
Cheers
Simon
-
May 14th, 2002, 11:00 AM
#7
Even Strings have the ToString() method
-
May 14th, 2002, 11:17 AM
#8
Junior Member
spooky
Simon
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
|