C# ::
Programmatically get the (Click-Once Published) Version
Source Code Snippet
//Default to the version of the currently executing Assembly
Version v = Assembly.GetExecutingAssembly().GetName().Version;
//Check to see if we are ClickOnce Deployed.
//i.e. the executing code was installed via ClickOnce
if (ApplicationDeployment.IsNetworkDeployed)
{
//Collect the ClickOnce Current Version
v = ApplicationDeployment.CurrentDeployment.CurrentVersion;
}
//Show the version in a simple manner
string sVersion = string.Format("Version: {0}", v);
MessageBox.Show(sVersion, "My Application");
async and await keywords (C# 5) by Webmaster - 2012-01-30 10:22:59 (3 views) [webclient]
Parallel Linq (PLinq) example by Webmaster - 2012-01-30 09:09:50 (4 views) [linq]
Resize a multidimensional array by Webmaster - 2012-01-29 18:42:26 (2 views)
Validate IP addres with TryParse by Webmaster - 2012-01-29 18:42:12 (1 views)
Serialization with BinaryWriter by Webmaster - 2012-01-29 18:42:07 (1 views) [filestream]
Compile at runtime by Webmaster - 2012-01-29 18:41:58 (2 views) [visual studio]
Search text file for string by Webmaster - 2012-01-29 18:41:14 (2 views) [regex]
Convert delimited file to XML by Webmaster - 2012-01-29 18:40:56 (2 views) [split]
RSA encryption by Webmaster - 2012-01-29 18:40:55 (2 views)
Excel cell auto format by Webmaster - 2012-01-29 18:40:50 (2 views)
No comment yet.