Skip to content

Instantly share code, notes, and snippets.

@goliver79
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save goliver79/9736947355105c36d26f to your computer and use it in GitHub Desktop.

Select an option

Save goliver79/9736947355105c36d26f to your computer and use it in GitHub Desktop.
[VB .NET] Display Current Version
Private Sub showCurrentVersion(lbl As Label)
Dim ver As String = ""
Try
' the application is installed using ClickOnce
ver = My.Application.Deployment.CurrentVersion.ToString
Catch ex As Exception
' the application is not installed
ver = My.Application.Info.Version.ToString
End Try
lbl.Text = ver
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment