|
-
Aug 8th, 2003, 03:53 AM
#1
Thread Starter
Hyperactive Member
How to get the version of my App? **SOLVED**
Hey, i have a small app and I want to get the version of my Application through code. I know its stored in AssemblyInfo. But how to extract it from there? Is there something that equals the app variable from VB?
Thanx, Stephan
Last edited by Sgt-Peppa; Aug 8th, 2003 at 04:13 AM.
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Aug 8th, 2003, 04:13 AM
#2
Thread Starter
Hyperactive Member
heres a solution for all interested.
Code:
using System.Reflection;
Assembly assembly = Assembly.GetCallingAssembly();
AssemblyName assemblyname = assembly.GetName();
Version assemblyver = assemblyname.Version;
txtResutl.text = assemblyver.toString();
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Aug 8th, 2003, 04:52 AM
#3
you could always do this ...
VB Code:
MessageBox.Show(System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString());
and i'm not to sure what the Environment.Version is , but ...
VB Code:
MessageBox.Show(Environment.Version.ToString());
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Aug 8th, 2003, 05:04 AM
#4
you can also do this.....
VB Code:
MessageBox.Show(System.Environment.CommandLine.GetType().Assembly.GetName().Version.ToString());
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|