projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #656 from LogosBible/collection_lock
[mono.git]
/
mcs
/
class
/
corlib
/
System
/
DBNull.cs
diff --git
a/mcs/class/corlib/System/DBNull.cs
b/mcs/class/corlib/System/DBNull.cs
index 8025df370ce62b7ad5343fc154d0222c06a60ea3..e730cc8599dbc17c8eca068f516552de363f12a6 100644
(file)
--- a/
mcs/class/corlib/System/DBNull.cs
+++ b/
mcs/class/corlib/System/DBNull.cs
@@
-33,10
+33,12
@@
//
using System.Runtime.Serialization;
//
using System.Runtime.Serialization;
+using System.Runtime.InteropServices;
namespace System
{
[Serializable]
namespace System
{
[Serializable]
+ [ComVisible (true)]
public sealed class DBNull : ISerializable, IConvertible
{
// Fields
public sealed class DBNull : ISerializable, IConvertible
{
// Fields
@@
-118,10
+120,12
@@
namespace System
throw new InvalidCastException ();
}
throw new InvalidCastException ();
}
- object IConvertible.ToType (Type type, IFormatProvider provider)
+ object IConvertible.ToType (Type t
argetT
ype, IFormatProvider provider)
{
{
- if (type == typeof (string))
+ if (t
argetT
ype == typeof (string))
return String.Empty;
return String.Empty;
+ if (targetType == typeof (DBNull))
+ return this;
throw new InvalidCastException ();
}
throw new InvalidCastException ();
}