projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cf1344
)
Add Love
author
Miguel de Icaza
<miguel@gnome.org>
Fri, 22 Jun 2001 21:39:44 +0000
(21:39 -0000)
committer
Miguel de Icaza
<miguel@gnome.org>
Fri, 22 Jun 2001 21:39:44 +0000
(21:39 -0000)
svn path=/trunk/mcs/; revision=30
mcs/class/corlib/System/Version.cs
patch
|
blob
|
history
diff --git
a/mcs/class/corlib/System/Version.cs
b/mcs/class/corlib/System/Version.cs
index 20bc0308966edf564f345fb1f334d4b16cccca14..3df261173d2fbce5695f2cbacf319ced4036b764 100644
(file)
--- a/
mcs/class/corlib/System/Version.cs
+++ b/
mcs/class/corlib/System/Version.cs
@@
-16,7
+16,18
@@
namespace System {
public Version (string version)
{
+ int n;
+ string [] vals = version.Split (new Char [] {'.'});
+ n = vals.Length;
+ if (n > 0)
+ major = int.Parse (vals [0]);
+ if (n > 1)
+ minor = int.Parse (vals [1]);
+ if (n > 2)
+ build = int.Parse (vals [2]);
+ if (n > 3)
+ build = int.Parse (vals [3]);
}
public Version (int major, int minor)