Reputation: 8626
You should all have noticed if you right click a file in the windows explorer, there is a tab named Details. Is there any trick to get these properties, and specifically the product name, whether this is a .NET file or not, over C#?
Upvotes: 1
Views: 612
Reputation: 292375
You can use the FileVersionInfo
class for that purpose.
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(fileName);
Console.WriteLine("Product name : {0}", fvi.ProductName);
Upvotes: 5