Accueil

Keywords cloud

jquery ebx prototype getelementbyid math time put_line cout jmp drupal mainloop luhn linq cbind ivalueconverter ada.text_io sorted mysql_select_db xor md5 sql cat mysql_connect environment given nserror mail singleton filesystemobject xaml regex design window preg_replace eax preg_match tuple tkinter stringbuilder mysql_error readystate nslog email regexp map session_start shift innerhtml curl nsarray sed float chomp mysql_fetch_assoc nsdictionary media background push pop split je grep color file_get_contents mysql_query setsockopt prawn unless socket theme defun cursor createobject function_exists rem registry collect perform dbms_output wpf done strtolower onreadystatechange ecx substr urllib raw_input rm text-align random mov quicksort list wordpress dict edx display tolowercase boost mysql_fetch_array

Languages

C#C# :: UnclassifiedProgrammatically get the (Click-Once Published) Version

Blank Source Code Snippet

Posted by Webmaster - 2011-08-26 11:14:38 (61 views)
//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");

Comments

Related Source Code Snippets