Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2004-08-17 21:50:06 +0400
committerSebastien Pouliot <sebastien@ximian.com>2004-08-17 21:50:06 +0400
commit7d35d3d45441bead53354b1d3b8d6fcb381d90f1 (patch)
tree9e7061cf60e9f8455f52c5bdcdc724915572e1e6 /mcs
parentc0226bb680508ea7e913ec6900e5ea682cf33cbe (diff)
2004-08-17 Sebastien Pouliot <sebastien@ximian.com>
* Version.cs: Fixed Clone so we can use it on versions with only major/minor or major/minor/build. svn path=/branches/mono-1-0/mcs/; revision=32441
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/System/ChangeLog5
-rw-r--r--mcs/class/corlib/System/Version.cs7
2 files changed, 11 insertions, 1 deletions
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index 8e4560b1bea..6c3feba3a1b 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-17 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Version.cs: Fixed Clone so we can use it on versions with only
+ major/minor or major/minor/build.
+
2004-07-07 Geoff Norton <gnorton@customerdna.com>
* Monotype.cs: Patch for bug #58844. Dont throw exceptions right away;
diff --git a/mcs/class/corlib/System/Version.cs b/mcs/class/corlib/System/Version.cs
index ea64cde7080..adc86fa5568 100644
--- a/mcs/class/corlib/System/Version.cs
+++ b/mcs/class/corlib/System/Version.cs
@@ -152,7 +152,12 @@ namespace System
public object Clone ()
{
- return new Version (_Major, _Minor, _Build, _Revision);
+ if (_Build == -1)
+ return new Version (_Major, _Minor);
+ else if (_Revision == -1)
+ return new Version (_Major, _Minor, _Build);
+ else
+ return new Version (_Major, _Minor, _Build, _Revision);
}
public int CompareTo (object version)