Thanks for your answersm now it's clear for me. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Jordan Sent: Wednesday, December 03, 2008 12:44 PM To: [email protected] Subject: Re: [Mono-list] Get Mono version at run-time
Guess what would happen if an assembly referencing this method is running on MS.NET ... Robert -----Original Message----- From: Alan McGovern [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2008 12:26 PM To: Alexander M. Batishchev Cc: Charlie Poole; [email protected] Subject: Re: [Mono-list] Get Mono version at run-time Because if you're using this for anything *other* than just displaying it as text, you're doing something wrong. You shouldn't be changing application behaviour based on the version of the framework it's running on. Alan. On Wed, Dec 3, 2008 at 8:22 AM, Alexander M. Batishchev <[EMAIL PROTECTED]> wrote: > Hi, > Why don't make this property public for common use if there is no other > method to get Mono version? And direct call is better than via reflection, I > guess. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Charlie Poole > Sent: Monday, December 01, 2008 10:50 PM > To: 'Chuck Esterbrook'; [email protected] > Subject: Re: [Mono-list] Get Mono version at run-time > > For NUnit, I invoke Mono.Runtime.GetDisplayName. It's not > public, so I invoke it by reflection. It gives a string > like "Mono 1.2.6", which you can parse to get the version > number or just use for display as I do. > > Charlie > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Chuck Esterbrook >> Sent: Monday, December 01, 2008 11:27 AM >> To: [email protected] >> Subject: [Mono-list] Get Mono version at run-time >> >> >> What's the best way to get the version number of Mono at >> run-time? For example, 1.2.6 vs. 2.0.1? >> >> I know you can detect Mono by seeing if the type Mono.Runtime >> exists, but when reflecting on its members, I didn't see any >> version information. >> >> I poked around the docs and did some searching, but "version" >> comes up in a lot of contexts. >> >> Just to be clear, I want something like: >> >> Console.WriteLine("Mono Version: {0}", Mono.Runtime.Version); >> >> Thanks, >> Chuck >> >> -- >> View this message in context: >> http://www.nabble.com/Get-Mono-version-at-run-time-tp20776236p >> 20776236.html >> Sent from the Mono - General mailing list archive at Nabble.com. >> >> _______________________________________________ >> Mono-list maillist - [email protected] >> http://lists.ximian.com/mailman/listinfo/mono-list >> > > > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
