File

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I am getting a file as follows:
FileStream file = System.IO.File.OpenRead(path);

I am using OpenRead because I will need to return a stream ...

I need to get the extension of file. How can I do this?

Thanks,
Miguel
 
I am getting a file as follows:
FileStream file = System.IO.File.OpenRead(path);

I am using OpenRead because I will need to return a stream ...

I need to get the extension of file. How can I do this?

Path.GetExtension(path)

Jon
 
Back
Top