C# application version

  • Thread starter Thread starter Cyrus
  • Start date Start date
C

Cyrus

Version ver = new Version(System.Windows.Forms.Application.ProductVersion);

i use the above method to get the version of the application
however it works in a vb.net code
but not c# code
it throws a nullreference exception
what's wrong
 
Cyrus said:
Version ver = new Version(System.Windows.Forms.Application.ProductVersion);

i use the above method to get the version of the application
however it works in a vb.net code
but not c# code
it throws a nullreference exception
what's wrong

Works fine in my C#.
 
* "Cyrus said:
Version ver = new Version(System.Windows.Forms.Application.ProductVersion);

i use the above method to get the version of the application
however it works in a vb.net code
but not c# code
it throws a nullreference exception
what's wrong

Are you really sure _this_ line throws the exception? What does
'Application.ProductVersion' return in your case?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top