GetFileVersionInfo

  • Thread starter Thread starter Tyrone
  • Start date Start date
T

Tyrone

I want to be able to display the attributes of a jpg file using the
fileversioninfo class.

I have tried the following code below but it doesn't work, where am i going
wrong? does it need special permissions?

FileVersionInfo FileProperties =
FileVersionInfo.GetVersionInfo(@"C:\test.txt");

Console.Write(FileProperties.FileDescription + '\n');

Console.Write(FileProperties.FileVersion + '\n');

Console.Write(FileProperties.InternalName + '\n');

Console.Write(FileProperties.OriginalFilename + '\n');

Console.Write(FileProperties.ProductName + '\n');

Console.Write(FileProperties.ProductVersion + '\n');

Console.Write(FileProperties.Language + '\n');
 
Back
Top