Link to home
Start Free TrialLog in
Avatar of talker2004
talker2004Flag for United States of America

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\\thisdir\\wholebunchofbackslashes\\

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\thisdir\wholebunchofbackslashes\

thakns in advance

public static void CreateVirtualDirectory(string aRootFolder, string aVirtualDirectoryName, string aDirectory)
        {
         // create the iis virtual directory
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Shane32EE
Shane32EE

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of talker2004

ASKER

Thanks so much for all of your help