|
-
Aug 2nd, 2004, 03:35 PM
#1
Thread Starter
Frenzied Member
yet another stupid question. [RESOLVED]
this in vb:
VB Code:
DressText = Trim(Str.Replace("º", "'"))
should be this in c#, right? this is in a function that returns a string:
VB Code:
return str.Trim(str.Replace("º", "'"));
it's telling me that a character can't be converted to a string?
Last edited by Andy; Aug 13th, 2004 at 11:48 AM.
-
Aug 2nd, 2004, 03:46 PM
#2
try:
Code:
return str.Replace("º", "'").Trim();
you don't need to pass the string to Trim(), because it's a member function. the compiler throught you were trying to specifying what characters to trim, and got upset because str wasn't a character / character array.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Aug 2nd, 2004, 03:51 PM
#3
Thread Starter
Frenzied Member
that worked perfectly. I hope learning c# isnt as hard as learning vb was lol
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
|