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?
C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on.
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.
Quote from wikipedia: "A successor to the programming language B, C was originally developed at Bell Labs by Dennis Ritchie between 1972 and 1973 to construct utilities running on Unix." The creators want that everyone "see" his language. So he named it "C".
" " C is a computer programming language. That means that you can use C to create lists of instructions for a computer to follow. C is one of thousands of programming languages currently in use.
Path.DirectorySeparatorChar
gives you the character used to separate directories in a path, i.e. you use it in paths.
Path.PathSeparator
gives you the character used to separate paths in environment variables, i.e. you use it between paths.
For example, your system's PATH
environment variable will typically list multiple paths where the OS will look for applications to run.
On Windows, Path.PathSeparator
is ;
, and Path.DirectorySeparatorChar
is \
. Two paths would be stored in an environment variable like this:
set PATH="C:\first\path;C:\second\path"
Is System.IO.Path.PathSeparator
what you're actually looking for? There's also .DirectorySeparatorChar
and others. See the System.IO.Path class under "Fields".
To elaborate, a path separator is used to concatenate multiple full paths together (think the PATH
environmental 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With