i get file extension with Path.GetExtension method. But it return to me .jpg But i want only jpg
string extension=Path.GetExtension(fileName);
How can i get extension without dot ?
CodePudding user response:
Propably there is no method for this. But you can use String.Replace method after GetExtension()
string extension=Path.GetExtension(fileName).Replace(".", "");