I program in WPF C#. I have e.g. the following path:
C:\\Program Files\\hello.txt
and I want to extract hello
hello
You can use Path API as follow:
var filenNme = Path.GetFileNameWithoutExtension([File Path]);
More info: Path.GetFileNameWithoutExtension