[Mono-devel-list] [PATCH] Added Mono.Runtime.GetVersion()

Ben Maurer bmaurer at ximian.com
Sat Jun 4 17:04:05 EDT 2005


On Sat, 2005-06-04 at 23:00 +0200, Kornél Pál wrote:
> Modified version:
> Mono.Runtime.GetVersionString returns version as a string in it's raw form.
> Mono.Runtime.GetVersion returns version as a Version object parsed using
> Version.CreateFromString that means:
> - will allways have 4 fields
> - missing fields are replaced with zeros
> - extra fields are ignored
> - anything other than digits is considered to be separator
> - leading separators are igonred
> - a separator can be more than one character long
> - for example: "v1..2r3alpha" -> 1.2.3.0
> 
> Is this implementation OK for everyone?

+               // Should not be removed intended for external use
+               // Safe to be called using reflection
+               internal static Version GetVersion ()
+               {
+                       return Version.CreateFromString
(GetVersionString ());
+               }

Just kill that method. It may or may not work.

-- Ben




More information about the Mono-devel-list mailing list