Nov 4, 2003 #1 hugh999 MIS Nov 29, 2001 129 IE Hi How do you replace a character in a string. Using a command buttton, I am trying to replace the charcater '\' in a textBox with the character '-'. Thanks
Hi How do you replace a character in a string. Using a command buttton, I am trying to replace the charcater '\' in a textBox with the character '-'. Thanks
Nov 4, 2003 1 Thread starter #2 hugh999 MIS Nov 29, 2001 129 IE Found code in the Help. string.Replace ('\\', '-') Upvote 0 Downvote
Dec 12, 2003 #3 apc2003 Programmer Aug 29, 2003 54 GB Use: Code: string textStr = @"Hello\This\Is\A\Text"; testStr = testStr.Replace('\\', '-'); Upvote 0 Downvote