Nov 4, 2003 #1 hugh999 MIS Joined Nov 29, 2001 Messages 129 Location 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 Joined Nov 29, 2001 Messages 129 Location IE Found code in the Help. string.Replace ('\\', '-') Upvote 0 Downvote
Dec 12, 2003 #3 apc2003 Programmer Joined Aug 29, 2003 Messages 54 Location GB Use: Code: string textStr = @"Hello\This\Is\A\Text"; testStr = testStr.Replace('\\', '-'); Upvote 0 Downvote