Hi All,
Very simple one today I have a text box containing the path to be used for a save file
ie: C:\Test\Test_One I need text box (txtPath.Text) to contain C:\\Test\\Test_One for the file writing system so what is the correct way of putting an extra \ in text of the path. I did try txtPath.Text.Replace('\','\\'); but this came back as syntax error as '\\' is not a single character so I tried it as a string ("\\","\\\\"), this appeared to work. The issue is now how can I get C:\\Test\\Test_One to be seen as C:\Test\Test_One or will it be seen that way anyway.
Glenn
Loading
Glenn PattonPosted May 22, 2012, 11:02 AM
VulpesPosted May 22, 2012, 10:59 AM
The only exception is the double quote character ('"') which needs to be doubled in a verbatim literal so the compiler doesn't think it's reached the end of the string.
Glenn PattonPosted May 22, 2012, 8:53 AM
Sorted it the magic @ sorted it. Amazing what a break will do!
Glenn