//
using System.Runtime.Serialization;
+using System.Runtime.InteropServices;
namespace System
{
[Serializable]
+ [ComVisible (true)]
public sealed class DBNull : ISerializable, IConvertible
{
// Fields
throw new InvalidCastException ();
}
- object IConvertible.ToType (Type type, IFormatProvider provider)
+ object IConvertible.ToType (Type targetType, IFormatProvider provider)
{
- if (type == typeof (string))
+ if (targetType == typeof (string))
return String.Empty;
+ if (targetType == typeof (DBNull))
+ return this;
throw new InvalidCastException ();
}