I have a helper class pulling a string from an XML file. That string is a file path (so it has backslashes in it). I need to use that string as it is... How can I use it lik
I'm not sure if I understand. In your example: if helper.getFilePath()
returns "c:\somepath\file.txt"
, there will be no problem, since the @
is only needed if you are explicitely specifying a string with "".
When Functions talk to each other, you will always get the literal path. If the XML contains c:\somepath\file.txt
and your function returns c:\somepath\file.txt
, then string filePath will also contain c:\somepath\file.txt
as a valid path.