Default arguments
- using partial methods, default arguments should only be declared in one place. So when you have a
partial class and split a method in declaration and implementation, only declare default arguments in
one of them. Preferably the declaration.
Get the Application version (Assembly version)
System.Reflection.Assembly.GetEntryAssembly()?.GetName().Version?.ToString();
This corresponds to the <AssemblyVersion>0.2.1</AssemblyVersion> setting in the project file.
Alternatively, it can be set with the [assembly: AssemblyVersion("1.0.0.0")] annotation.