Get name for a directory in CSharp
Description
The following code shows how to get name for a directory.
Example
using System;/*from ww w. ja v a2 s . c o m*/
using System.Diagnostics;
using System.IO;
class TestPathApp {
static void Main(string[] args) {
Console.WriteLine(Path.GetDirectoryName(Directory.GetCurrentDirectory()));
}
}
The code above generates the following result.