Get file name without extension in CSharp
Description
The following code shows how to get file name without extension.
Example
using System;/*from w w w.jav a 2 s. com*/
using System.Diagnostics;
using System.IO;
class TestPathApp {
static void Main(string[] args) {
Console.WriteLine(Path.GetFileNameWithoutExtension("c:/abc.cs"));
}
}
The code above generates the following result.