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
 
Back
Top