Technical Fun

Displaying Assembly Version

Posted on: November 19, 2007

Once upon a time, a narcissist felt the urge to display his assembly version to the crowd.
He had edited the AssemblyInfo.cs’ AssemblyVersion attribute to use 1.0.0.*.
Now, he wanted everyone to see the strange numbers of his assembly version.

He referenced System.Reflection carefully,
He then called these lines solemnly

Assembly asm = Assembly.GetCallingAssembly();
string version = asm.GetName().Version.ToString();

He chuckled in an insane glee, and disappeared, never again seen.
He had reached the Nirvana.

Advertisements
Tags: ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: