using System;
using System.Reflection;
using System.Diagnostics;
using System.IO;
namespace VersionExe
{
class Program
{
public static void Main(string[] args)
{
int i;
// Get the file version for the notepad.
FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, "notepad.exe"));
FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\notepad.exe");
// Print the file name and version number.
Console.WriteLine("File: " + myFileVersionInfo.FileDescription + '\n' +
"Version number: " + myFileVersionInfo.FileVersion);
for (i = 0; i < 10000000000; i++)
{
}
}
}
}
I want to know version no. of dll file using the above code that i have written. But it s showing an error. How can i get dll file version?