talker2004
asked on
problem with double backslashes in c#
I am a vb.net programmer, I am starting to work more with c#. I have a vb.net program which calls a c# method. When i pass aDirectory to the c# method it comes through as
c:\\mydir\\theotherdir\\th isdir\\who lebunchofb ackslashes \\
Ok, I know about the @ prefixing the string to use literal strings. But nothing i am doing seems to work, and I suspect the double backslashes in the path to be the problem with the function. Please could someone advise me on how i could deal with the double backslashes so that aDirectory looks like this when i am debugging the method.
c:\mydir\theotherdir\thisd ir\wholebu nchofbacks lashes\
thakns in advance
c:\\mydir\\theotherdir\\th
Ok, I know about the @ prefixing the string to use literal strings. But nothing i am doing seems to work, and I suspect the double backslashes in the path to be the problem with the function. Please could someone advise me on how i could deal with the double backslashes so that aDirectory looks like this when i am debugging the method.
c:\mydir\theotherdir\thisd
thakns in advance
public static void CreateVirtualDirectory(string aRootFolder, string aVirtualDirectoryName, string aDirectory)
{
// create the iis virtual directory
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER