Path.DirectorySeparatorChar gives you the character used to separate directories in a path, i.e. you use it in .
Path.PathSeparator gives you the character used to separate paths in environment variables, i.e. you use it between .
For example, your system PATH variable will usually indicate several paths in which the OS will look for applications to run.
In Windows Path.PathSeparator is ; , and Path.DirectorySeparatorChar - \ , two paths will be stored in an environment variable like this:
set PATH="C:\first\path;C:\second\path"
Ergwun
source share