[Mono-list] Get Mono version at run-time
Alexander M. Batishchev
abatishchev at godfather.net.ru
Wed Dec 3 03:22:01 EST 2008
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: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Charlie Poole
Sent: Monday, December 01, 2008 10:50 PM
To: 'Chuck Esterbrook'; mono-list at lists.ximian.com
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: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of
> Chuck Esterbrook
> Sent: Monday, December 01, 2008 11:27 AM
> To: mono-list at lists.ximian.com
> 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 - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list