Obtaining object's version

  • Thread starter Thread starter Richard L Rosenheim
  • Start date Start date
R

Richard L Rosenheim

Given an object, does anyone have any sample code for determining the
version number of it's assembly?

TIA,

Richard Rosenheim
 
Richard,

Try the following:

GetAssemblyVersion(object o)
{
if (o != null)
o.GetType().Assembly.GetName().GetVersion();
}

Regards,
Michael
 
Thanks -- not quite right, but close enough for me to find it. The
corrected line is:

o.GetType().Assembly.GetName().Version;

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Determining version of MDAC 2
ShowDialog question 3
Context menu question 1
Monitoring the clipboard? 2
1 solution or 2? 1
Looking for a treeview control 2
Determining version of a DLL 2
Parsing a filename 4

Back
Top