472,980 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,980 software developers and data experts.

Obtaining object's version

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

TIA,

Richard Rosenheim
Jul 21 '05 #1
2 1103
Richard,

Try the following:

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

Regards,
Michael

"Richard L Rosenheim" <ri*****@rlr.com> schrieb im Newsbeitrag
news:ub**************@tk2msftngp13.phx.gbl...
Given an object, does anyone have any sample code for determining the
version number of it's assembly?

TIA,

Richard Rosenheim

Jul 21 '05 #2
Thanks -- not quite right, but close enough for me to find it. The
corrected line is:

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

Richard
"Michael Groeger" <go*********@web.de> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Richard,

Try the following:

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

Regards,
Michael

"Richard L Rosenheim" <ri*****@rlr.com> schrieb im Newsbeitrag
news:ub**************@tk2msftngp13.phx.gbl...
Given an object, does anyone have any sample code for determining the
version number of it's assembly?

TIA,

Richard Rosenheim


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
Dear Group Sorry for posting this here. I'm desperate for a solution to this problem and thought some of you might have come across it with .NET and SQL Server. Let's assume I've the following...
1
by: Alan Taylor | last post by:
How is it possible to tell which version of ADO is installed on an XP workstation? Thanks
3
by: Kamalanathan T. | last post by:
Hi, We have developed an Web application in ASP.NET with C# and we r using SQL Server 2000. We get the Timeout expired error, when more than 300 concurrent users hit the site. I hagone thru...
2
by: Richard L Rosenheim | last post by:
Given an object, does anyone have any sample code for determining the version number of it's assembly? TIA, Richard Rosenheim
1
by: Chris Edgington | last post by:
How do I get a handle to an object from one of its member functions? I cannot find anything in the docs that shows a handle version of the "this" pointer - but there has to be one - right? ...
11
by: seannakasone | last post by:
Is there a way to get the callstack level in c++? for example, take the following code: void call3() { //callstack level would be 3 } void call2() { //callstack level would be 2 call3();
11
by: John Nagle | last post by:
The Python SSL object offers two methods from obtaining the info from an SSL certificate, "server()" and "issuer()". The actual values in the certificate are a series of name/value pairs in ASN.1...
7
by: bouy78 | last post by:
Quick Question Seems to be an easy task, but apparently I'm not very bright. I have an array of checkboxes, created at runtime and inserted in a panel. Upon creation, they're each attached to...
4
by: =?Utf-8?B?anBzaG9ydHN0dWZm?= | last post by:
Hi, not sure if this is the right place for this but it was definitely the closest I could find. I am having trouble with the GetFileVersionInformation/VerQueryValue functions and was wondering...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.