Answers for "c# get file extension from filenae"

C#
5

c# get file extension

string myFilePath = @"C:\MyFile.txt";
string ext = Path.GetExtension(myFilePath);
// ext would be ".txt"
Posted by: Guest on August-11-2020
0

get file extension in c# file upload

string extension=System.IO.Path.GetExtension(file1.FileName);
Posted by: Guest on March-06-2022

Code answers related to "c# get file extension from filenae"

C# Answers by Framework

Browse Popular Code Answers by Language