Results 1 to 3 of 3

Thread: yet another stupid question. [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    yet another stupid question. [RESOLVED]

    this in vb:
    VB Code:
    1. DressText = Trim(Str.Replace("º", "'"))

    should be this in c#, right? this is in a function that returns a string:
    VB Code:
    1. 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.

  2. #2
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    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.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    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
  •  



Click Here to Expand Forum to Full Width