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
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/System/Version.cs')
-rw-r--r--mcs/class/corlib/System/Version.cs7
1 files changed, 6 insertions, 1 deletions
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)