Is there possible to use char “//” another there I did it? I looked for in Path, but I can’t find it.
string separator = "//";
I mean ‘/’.
I used:
static string sep = System.IO.Path.PathSeparator.ToString();
but it returns: ‘;’. Why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is
System.IO.Path.PathSeparatorwhat you’re actually looking for? There’s also.DirectorySeparatorCharand others. See the System.IO.Path class under "Fields".To elaborate, a path separator is used to concatenate multiple full paths together (think the
PATHenvironmental variable). It sounds like you’re after the directory separator, which is used within a single path to split out folders/ files. (In windows it’s commonly\, and/basically elsewhere).