|
-
Mar 20th, 2006, 11:32 PM
#1
Re: Please Help Create A VB6 to .NET Function Conversion Chart [Final Draft]
 Originally Posted by eyeRmonkey
JMC, could you explain how/when/why I would call format on a class? I'm not sure I follow you on that one.
If you have a single object that you want to convert to a string and specify a format then you would normally call the ToString method of that object. If you want to insert an object into a string at a specific point or you have multiple object s that you want to put into a string then you would normally use String.Format. String.Format allows you to specify the same format strings that you can pass to ToString.
 Originally Posted by eyeRmonkey
I updated the page. Does it look more correct JMC?
There's still an error with Format. String.Format is a Shared method so you don't call it on a String object, but rather on the String class itself, i.e.
Format => [String object].Format 'this is wrong.
Format => String.Format 'this is correct.
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
|