For any type of app:
Assembly.GetExecutingAssembly().GetName().Version
For a WinForm app:
Application.ProductVersion
Using
GetExecutingAssembly
for an assembly reference is not always an option. This a useful static helper class for projects where you need to reference the underlying assembly or assembly version:
public static class CoreAssembly
{
public static readonly Assembly Reference = typeof(CoreAssembly).Assembly;
public static readonly Version Version = Reference.GetName().Version;
}