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:
authorBoris Kirzner <borisk@mono-cvs.ximian.com>2004-05-27 14:36:17 +0400
committerBoris Kirzner <borisk@mono-cvs.ximian.com>2004-05-27 14:36:17 +0400
commitd4242205323c54a2a26d32c3750589e70db78104 (patch)
tree2ce8b780026ce37ec5b80038e995a92db13ce4d3 /mcs/class/System.Data/System.Data.Common/DataContainer.cs
parenta5c830fc409b0e8c17e57732c028bd117c2fe91d (diff)
* DataContainer.cs : Bug fixes in BitDataContainer.get_Item and StringDataContainer.SetValue .
svn path=/trunk/mcs/; revision=28244
Diffstat (limited to 'mcs/class/System.Data/System.Data.Common/DataContainer.cs')
-rw-r--r--mcs/class/System.Data/System.Data.Common/DataContainer.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
index aea2c815f33..244876eafa6 100644
--- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs
+++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
@@ -761,7 +761,7 @@ namespace System.Data.Common
return DBNull.Value;
}
else {
- return !isNull;
+ return _values[index];
}
}
set {
@@ -941,8 +941,13 @@ namespace System.Data.Common
protected override void SetValue(int index, object value)
{
- if ( value != null && value != DBNull.Value && !(value is string)) {
- SetValue(index, Convert.ToString(value));
+ if ( value != null && value != DBNull.Value ) {
+ if ( value is string ) {
+ SetValue(index, (string) value);
+ }
+ else {
+ SetValue(index, Convert.ToString(value));
+ }
return;
}