GetFileVersionInfo

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');
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top