My application has an exe and uses some DLLs. I am writing all in C#.
In one DLL I want to write a method to get the application name and version from the version in
System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
This function will give version of Application from where other libraries are loaded.
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
This will give version of current library. If you call this in Application library you will get application version and if call this in a DLL then will get that DLL version.
So in my opinion System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
is currect function to use.