Results 1 to 2 of 2

Thread: [RESOLVED] Help with String.Replace

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Resolved [RESOLVED] Help with String.Replace

    hi guys! Is the code below is the right implementation of String.Replace?
    Code:
                SearchString = TxtSettingsUserSearch.Text;
                SearchString.Replace("*", "%");
                MessageBox.Show("SearchString: " + SearchString);
    If not, can you please help on how to replace * to %. Thanks in advance!

  2. #2

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: Help with String.Replace

    oh! Sorry guys...My mistake... I should assign
    Code:
    SearchString.Replace("*", "%");
    to SearchString variable for me to see the result of replace when i call the
    Code:
     MessageBox.Show("SearchString: " + SearchString);

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