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:
authorVille Palo <ville@mono-cvs.ximian.com>2003-06-03 22:42:43 +0400
committerVille Palo <ville@mono-cvs.ximian.com>2003-06-03 22:42:43 +0400
commit940ba904d500a15df55a52d91e893bfcce8717fe (patch)
tree7f29724555695cf58b1c186b7878b994db2d9d01 /mcs/class/System.Data/System.Data.SqlTypes
parent72d640f0cbf5d552f6ffb2ce37fd01a9f5594292 (diff)
2003-06-03 Ville Palo <vi64pa@kolumbus.fi>
* SqlBinary.cs: Changed one SqlTypeException --> IndexOutOfRange * SqlMoney.cs: checkings svn path=/trunk/mcs/; revision=15090
Diffstat (limited to 'mcs/class/System.Data/System.Data.SqlTypes')
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/ChangeLog5
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlBinary.cs2
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs40
3 files changed, 28 insertions, 19 deletions
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
index 23bdb3bf70c..3b7001695d6 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
+++ b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-03 Ville Palo <vi64pa@kolumbus.fi>
+
+ * SqlBinary.cs: Changed one SqlTypeException --> IndexOutOfRange
+ * SqlMoney.cs: checkings
+
2003-06-02 Ville Palo <vi64pa@kolumbus.fi>
* SqlString.cs: implementes less than and greater than operators.
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlBinary.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlBinary.cs
index fd926e8774f..a8629d4be88 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlBinary.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlBinary.cs
@@ -51,7 +51,7 @@ namespace System.Data.SqlTypes
if (this.IsNull)
throw new SqlNullValueException ("The property contains Null.");
else if (index >= this.Length)
- throw new SqlNullValueException ("The index parameter indicates a position beyond the length of the byte array.");
+ throw new IndexOutOfRangeException ("The index parameter indicates a position beyond the length of the byte array.");
else
return value [index];
}
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs
index 857428bcc0c..cedb00ec29c 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlMoney.cs
@@ -315,32 +315,35 @@ namespace System.Data.SqlTypes
}
public static explicit operator SqlMoney (SqlBoolean x)
- {
- checked {
- if (x.IsNull)
- return Null;
- else
+ {
+ if (x.IsNull)
+ return Null;
+ else {
+ checked {
return new SqlMoney ((decimal)x.ByteValue);
+ }
}
}
public static explicit operator SqlMoney (SqlDecimal x)
{
- checked {
- if (x.IsNull)
- return Null;
- else
+ if (x.IsNull)
+ return Null;
+ else {
+ checked {
return new SqlMoney (x.Value);
+ }
}
}
public static explicit operator SqlMoney (SqlDouble x)
{
- checked {
- if (x.IsNull)
- return Null;
- else
+ if (x.IsNull)
+ return Null;
+ else {
+ checked {
return new SqlMoney ((decimal)x.Value);
+ }
}
}
@@ -351,11 +354,12 @@ namespace System.Data.SqlTypes
public static explicit operator SqlMoney (SqlSingle x)
{
- checked {
- if (x.IsNull)
- return Null;
- else
+ if (x.IsNull)
+ return Null;
+ else {
+ checked {
return new SqlMoney ((decimal)x.Value);
+ }
}
}
@@ -392,7 +396,7 @@ namespace System.Data.SqlTypes
if (x.IsNull)
return Null;
else
- return new SqlMoney ((decimal)x.Value);
+ return new SqlMoney (x.Value);
}
public static implicit operator SqlMoney (SqlInt64 x)