1 instantiation of DBNull
mscorlib (1)
system\dbnull.cs (1)
28public static readonly DBNull Value = new DBNull();
526 references to DBNull
mscorlib (27)
microsoft\win32\oavariantlib.cs (1)
60typeof(DBNull),
system\convert.cs (3)
118(RuntimeType)typeof(System.DBNull), 163public static readonly Object DBNull = System.DBNull.Value; 185if (value == System.DBNull.Value) return true;
system\dbnull.cs (1)
28public static readonly DBNull Value = new DBNull();
system\defaultbinder.cs (2)
143if (par[j].DefaultValue == System.DBNull.Value) 150if (par[j].DefaultValue == System.DBNull.Value)
system\oleautbinder.cs (2)
66if (srcType == typeof(DBNull)) 69if (type == typeof(DBNull))
system\reflection\fieldinfo.cs (1)
925if (value == DBNull.Value)
system\reflection\mdconstant.cs (3)
36return DBNull.Value; 90return DBNull.Value; 114return DBNull.Value;
system\reflection\methodbase.cs (1)
354if (p[i].DefaultValue == System.DBNull.Value)
system\reflection\parameterinfo.cs (5)
562return (defaultValue != DBNull.Value); 580if (defaultValue == DBNull.Value) 606return DBNull.Value; 644if (defaultValue == DBNull.Value) 686if (defaultValue == DBNull.Value)
system\reflection\propertyinfo.cs (1)
475if (defaultValue == DBNull.Value)
system\runtime\compilerservices\customconstantattribute.cs (1)
28return DBNull.Value;
system\Runtime\InteropServices\Variant.cs (1)
259case VarEnum.VT_NULL: return DBNull.Value;
system\unityserializationholder.cs (1)
237return DBNull.Value;
system\variant.cs (4)
113typeof(System.DBNull), 118internal static readonly Variant DBNull = new Variant(Variant.CV_NULL, System.DBNull.Value, 0, 0); 293if (obj == System.DBNull.Value) { 413return System.DBNull.Value;
PresentationFramework (3)
src\Framework\System\Windows\Data\BindingExpression.cs (2)
1367else if ((value == DBNull.Value) && (Converter == null || UseDefaultValueConverter)) 1899value = DBNull.Value;
src\Framework\System\Windows\Interop\DynamicScriptObject.cs (1)
701|| type == typeof(DBNull)
System (28)
compmod\system\collections\specialized\nameobjectcollectionbase.cs (1)
112internal NameObjectCollectionBase(DBNull dummy)
compmod\system\collections\specialized\namevaluecollection.cs (1)
110internal NameValueCollection(DBNull dummy) : base(dummy)
net\System\Net\_AutoWebProxyScriptHelper.cs (2)
450if (gmt != null && gmt != DBNull.Value && gmt != Missing.Value) 458if (wd2 != null && wd2 != DBNull.Value && gmt != Missing.Value)
net\System\Net\_LazyAsyncResult.cs (7)
77m_Result = DBNull.Value; 90GlobalLog.Assert(result != DBNull.Value, "LazyAsyncResult#{0}::.ctor()|Result can't be set to DBNull - it's a special internal value.", ValidationHelper.HashString(this)); 289return m_Result == DBNull.Value ? null : m_Result; 300GlobalLog.Assert(value != DBNull.Value, "LazyAsyncResult#{0}::set_Result()|Result can't be set to DBNull - it's a special internal value.", ValidationHelper.HashString(this)); 337if (result == DBNull.Value) 351if (m_Result == DBNull.Value) 519while (m_Result == DBNull.Value)
net\System\Net\HttpWebRequest.cs (12)
2109object returnResult = Interlocked.Exchange(ref m_PendingReturnResult, DBNull.Value); 2123else if (returnResult != null && returnResult != DBNull.Value) 2341if (oldResult == DBNull.Value) 2362if (oldResult == DBNull.Value) 3403if (Async && _CoreResponse != null && (object)_CoreResponse != (object)DBNull.Value) 3509_CoreResponse = DBNull.Value; 3528object responseData = Async? Interlocked.CompareExchange(ref _CoreResponse, null, DBNull.Value): _CoreResponse; 3530if (responseData == DBNull.Value) 3578object responseData = Interlocked.CompareExchange(ref _CoreResponse, responseOrException, DBNull.Value); 3598else if (responseData.GetType() != typeof(DBNull)) 3623if (responseData == DBNull.Value) 4057|| HttpWriteMode == HttpWriteMode.Buffer || m_PendingReturnResult == DBNull.Value || m_OriginallyBuffered)
net\System\Net\ServicePoint.cs (1)
180m_CachedChannelBinding = (binding != null ? (object)binding : (object)DBNull.Value);
net\System\Net\WebHeaderCollection.cs (4)
979public WebHeaderCollection() : base(DBNull.Value) 983internal WebHeaderCollection(WebHeaderCollectionType type) : base(DBNull.Value) 991internal WebHeaderCollection(NameValueCollection cc): base(DBNull.Value) 1016base(DBNull.Value)
System.Activities.DurableInstancing (43)
System\Activities\DurableInstancing\CreateWorkflowOwnerAsyncResult.cs (5)
90parameters.Add(new SqlParameter { ParameterName = "@workflowHostType", SqlDbType = SqlDbType.UniqueIdentifier, Value = (base.Store.WorkflowHostType != Guid.Empty) ? base.Store.WorkflowHostType : (object) DBNull.Value }); 93parameters.Add(new SqlParameter { ParameterName = "@primitiveLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[0].Count, Value = (object)(properties[0].Array) ?? DBNull.Value }); 94parameters.Add(new SqlParameter { ParameterName = "@complexLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[1].Count, Value = (object)(properties[1].Array) ?? DBNull.Value }); 95parameters.Add(new SqlParameter { ParameterName = "@writeOnlyPrimitiveLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[2].Count, Value = (object)(properties[2].Array) ?? DBNull.Value }); 96parameters.Add(new SqlParameter { ParameterName = "@writeOnlyComplexLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[3].Count, Value = (object)(properties[3].Array) ?? DBNull.Value });
System\Activities\DurableInstancing\LoadWorkflowAsyncResult.cs (3)
71parameters.Add(new SqlParameter { ParameterName = "@keysToAssociate", SqlDbType = SqlDbType.Xml, Value = singleKeyToAssociate ? DBNull.Value : SerializationUtilities.CreateCorrelationKeyXmlBlob(keysToAssociate) }); 73parameters.Add(new SqlParameter { ParameterName = "@concatenatedKeyProperties", SqlDbType = SqlDbType.VarBinary, Value = (object) concatenatedKeyProperties ?? DBNull.Value }); 75parameters.Add(new SqlParameter { ParameterName = "@singleKeyId", SqlDbType = SqlDbType.UniqueIdentifier, Value = singleKeyToAssociate ? keysToAssociate[0].KeyId : (object) DBNull.Value });
System\Activities\DurableInstancing\SaveWorkflowAsyncResult.cs (33)
78parameters.Add(new SqlParameter { ParameterName = "@timerDurationMilliseconds", SqlDbType = SqlDbType.BigInt, Value = (object)GetPendingTimerExpiration(saveWorkflowCommand) ?? DBNull.Value }); 81parameters.Add(new SqlParameter { ParameterName = "@suspensionReason", SqlDbType = SqlDbType.NVarChar, Value = (object)suspensionReason ?? DBNull.Value }); 82parameters.Add(new SqlParameter { ParameterName = "@suspensionExceptionName", SqlDbType = SqlDbType.NVarChar, Size = 450, Value = (object)suspensionExceptionName ?? DBNull.Value }); 85parameters.Add(new SqlParameter { ParameterName = "@workflowHostType", SqlDbType = SqlDbType.UniqueIdentifier, Value = (object)GetWorkflowHostType(saveWorkflowCommand) ?? DBNull.Value }); 92parameters.Add(new SqlParameter { ParameterName = "@identityMetadata", SqlDbType = SqlDbType.Xml, Value = (object)identityMetadataXml ?? DBNull.Value }); 193object parameterValue = (parameterSize == -1 ? SaveWorkflowAsyncResult.GenerateByteArray(source) : source.Array) ?? (object)DBNull.Value; 437parameters.Add(new SqlParameter { ParameterName = "@serviceName", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = serviceName ?? (object)DBNull.Value }); 438parameters.Add(new SqlParameter { ParameterName = "@serviceNamespace", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = serviceNamespace ?? (object)DBNull.Value }); 439parameters.Add(new SqlParameter { ParameterName = "@siteName", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = site ?? (object)DBNull.Value }); 440parameters.Add(new SqlParameter { ParameterName = "@relativeServicePath", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = relativeServicePath ?? (object)DBNull.Value }); 441parameters.Add(new SqlParameter { ParameterName = "@relativeApplicationPath", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = relativeApplicationPath ?? (object)DBNull.Value }); 445parameters.Add(new SqlParameter { ParameterName = "@serviceDeploymentId", SqlDbType = SqlDbType.BigInt, Value = (this.serviceDeploymentId != 0) ? (object)this.serviceDeploymentId : (object)DBNull.Value }); 479parameters.Add(new SqlParameter { ParameterName = "@keysToAssociate", SqlDbType = SqlDbType.Xml, Value = DBNull.Value }); 480parameters.Add(new SqlParameter { ParameterName = "@singleKeyId", SqlDbType = SqlDbType.UniqueIdentifier, Value = DBNull.Value }); 481parameters.Add(new SqlParameter { ParameterName = "@keysToComplete", SqlDbType = SqlDbType.Xml, Value = DBNull.Value }); 482parameters.Add(new SqlParameter { ParameterName = "@keysToFree", SqlDbType = SqlDbType.Xml, Value = DBNull.Value }); 483parameters.Add(new SqlParameter { ParameterName = "@concatenatedKeyProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.Value }); 484parameters.Add(new SqlParameter { ParameterName = "@primitiveDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.Value }); 485parameters.Add(new SqlParameter { ParameterName = "@complexDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.Value }); 486parameters.Add(new SqlParameter { ParameterName = "@writeOnlyPrimitiveDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.Value }); 487parameters.Add(new SqlParameter { ParameterName = "@writeOnlyComplexDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.Value }); 488parameters.Add(new SqlParameter { ParameterName = "@metadataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.Value }); 489parameters.Add(new SqlParameter { ParameterName = "@metadataIsConsistent", SqlDbType = SqlDbType.Bit, Value = DBNull.Value }); 490parameters.Add(new SqlParameter { ParameterName = "@encodingOption", SqlDbType = SqlDbType.TinyInt, Value = DBNull.Value }); 491parameters.Add(new SqlParameter { ParameterName = "@lastMachineRunOn", SqlDbType = SqlDbType.NVarChar, Value = DBNull.Value }); 492parameters.Add(new SqlParameter { ParameterName = "@executionStatus", SqlDbType = SqlDbType.NVarChar, Value = DBNull.Value }); 493parameters.Add(new SqlParameter { ParameterName = "@blockingBookmarks", SqlDbType = SqlDbType.NVarChar, Value = DBNull.Value }); 507parameters.Add(new SqlParameter { ParameterName = "@keysToAssociate", SqlDbType = SqlDbType.Xml, Value = singleKeyToAssociate ? DBNull.Value : SerializationUtilities.CreateCorrelationKeyXmlBlob(keysToAssociate) }); 508parameters.Add(new SqlParameter { ParameterName = "@singleKeyId", SqlDbType = SqlDbType.UniqueIdentifier, Value = singleKeyToAssociate ? keysToAssociate[0].KeyId : (object)DBNull.Value }); 511parameters.Add(new SqlParameter { ParameterName = "@concatenatedKeyProperties", SqlDbType = SqlDbType.VarBinary, Size = -1, Value = (object)concatenatedKeyProperties ?? DBNull.Value }); 515parameters.Add(new SqlParameter { ParameterName = "@executionStatus", SqlDbType = SqlDbType.NVarChar, Size = 450, Value = GetExecutionStatus(saveWorkflowCommand) ?? (object)DBNull.Value }); 516parameters.Add(new SqlParameter { ParameterName = "@blockingBookmarks", SqlDbType = SqlDbType.NVarChar, Size = -1, Value = GetBlockingBookmarks(saveWorkflowCommand) ?? (object)DBNull.Value }); 564parameters.Add(new SqlParameter() { SqlDbType = SqlDbType.Variant, ParameterName = argumentName, Value = propertyValue.Value ?? DBNull.Value });
System\Activities\DurableInstancing\SerializationUtilities.cs (1)
49return DBNull.Value;
System\Activities\DurableInstancing\StoreUtilities.cs (1)
149if ((sqlParameter.Value == DBNull.Value) || (sqlParameter.Value == null))
System.AddIn.Contract (6)
System\Addin\Contract\RemoteArgument.cs (6)
193return new RemoteArgument((DBNull)convertibleValue); 451public RemoteArgument(System.DBNull value) 459public RemoteArgument(System.DBNull value, bool isByRef) 973public System.DBNull DBNullValue 981return default(System.DBNull); 987return (System.DBNull)this._value;
System.Core (1)
Microsoft\Scripting\Ast\ParameterExpression.cs (1)
53case TypeCode.DBNull: return new PrimitiveParameterExpression<DBNull>(name);
System.Data (244)
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (12)
97ht.Add( typeof( System.DBNull ), ExtendedClrTypeCode.DBNull ); 197else if ( DBNull.Value == value ) { 654if (!(obj is DBNull)) { 690if (!(obj is DBNull)) { 741if (DBNull.Value != temp) { 747if (DBNull.Value == temp) { 792if (DBNull.Value == temp) { 822if (DBNull.Value == temp) { 852if (DBNull.Value == temp) { 881if (DBNull.Value == temp) { 889if (DBNull.Value == temp) { 909if (DBNull.Value == temp) {
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (8)
805result = DBNull.Value; 843result = DBNull.Value; 1107DBNull.Value, // SqlDbType.Variant 1115DBNull.Value, // SqlDbType.Date 1116DBNull.Value, // SqlDbType.Time 1117DBNull.Value, // SqlDbType.DateTime2 1118DBNull.Value, // SqlDbType.DateTimeOffset 1140result = DBNull.Value;
fx\src\data\System\Data\CodeGen\datacache.cs (1)
663if (column.DefaultValue != DBNull.Value) {
fx\src\data\System\Data\Common\AdapterUtil.cs (2)
2503if ((null == value) || (DBNull.Value == value)) { 2511if ((value == null) || (value == DBNull.Value)) {
fx\src\data\System\Data\Common\DataStorage.cs (3)
73typeof(DBNull), 135: this(column, type, defaultValue, DBNull.Value, false, storageType) { 472return ((null == value) || (DBNull.Value == value) || IsObjectSqlNull(value));
fx\src\data\System\Data\Common\ObjectStorage.cs (1)
30: base(column, type, defaultValue, DBNull.Value, typeof(ICloneable).IsAssignableFrom(type), GetStorageType(type)) {
fx\src\data\System\Data\Common\SQLConvert.cs (21)
20if ((value == DBNull.Value)) { // null is not valid, SqlByte is struct 38if (value == DBNull.Value) { 59if (value == DBNull.Value) { 87if (value == DBNull.Value) { 120if (value == DBNull.Value) { 168if (value == DBNull.Value) { 210if (value == DBNull.Value) { 254if (value == DBNull.Value) { 295if (value == DBNull.Value) { 313if ((value == DBNull.Value) || (value == null)) { 331if (value == DBNull.Value) { 349if (value == DBNull.Value) { 367if ((value == DBNull.Value) || (value == null)) { 385if (value == DBNull.Value) { 400if (value == DBNull.Value) { 419if ((DBNull.Value == value) || (null == value)) { return DBNull.Value; } 469if ((DBNull.Value == value) || (null == value)) { 470return DBNull.Value; 707if ((DBNull.Value == value) || (null == value)) { 708return DBNull.Value;
fx\src\data\System\Data\Common\SQLTypes\SQLBytesStorage.cs (1)
74if ((value == DBNull.Value) || (value == null)){
fx\src\data\System\Data\Common\SQLTypes\SQLCharsStorage.cs (1)
75if ((value == DBNull.Value) || (value == null)){
fx\src\data\System\Data\Common\SQLTypes\SqlUDTStorage.cs (2)
81if (DBNull.Value == value) { // it is not meaningful compare UDT with DBNull.Value WebData 113372 106if (DBNull.Value == value) {
fx\src\data\System\Data\Common\SQLTypes\SqlXmlStorage.cs (1)
75if ((value == DBNull.Value) || (value == null)){
fx\src\data\System\Data\DataColumn.cs (12)
41internal object defaultValue = DBNull.Value; // DefaultValue Converter 670if (defaultValue == DBNull.Value && this.implementsINullable) { // for perf I dont access property 691object newDefaultValue = (value == null) ? DBNull.Value : value; 692if (newDefaultValue != DBNull.Value && DataType != typeof(Object)) { 703defaultValueIsNull = ((newDefaultValue == DBNull.Value) || (this.ImplementsINullable && DataStorage.IsObjectSqlNull(newDefaultValue))) ? true : false; 1407if (dr[this] == DBNull.Value) { 1495clone.defaultValueIsNull = ((defaultValue == DBNull.Value) || (clone.ImplementsINullable && DataStorage.IsObjectSqlNull(defaultValue))) ? true : false; 1540return DBNull.Value; 1636if (value != null && value != DBNull.Value && ((string)value).Length > MaxLength) { 1662DataRow[] rows = index.GetRows(index.FindRecords(DBNull.Value)); 1726Debug.Assert(value != null && (value != DBNull.Value), "Caller is resposible for checking on DBNull"); 1732Debug.Assert(value != null && (value != DBNull.Value), "Caller is resposible for checking on DBNull");
fx\src\data\System\Data\DataColumnPropertyDescriptor.cs (2)
76 return (dataRowView.GetColumnValue(column) != DBNull.Value); 87dataRowView.SetColumnValue(column, DBNull.Value);// no need to ccheck for the col type and set Sql...Null!
fx\src\data\System\Data\DataRow.cs (8)
161if ((DBNull.Value != value) && ((IChangeTracking)value).IsChanged) { 306proposed = DBNull.Value; 448proposed = DBNull.Value; 499if (DBNull.Value != value) { 1098if (DBNull.Value != value){ 1112if (DBNull.Value != value) { 1156this[column] = DBNull.Value; 1242parentKeyValues[0] = DBNull.Value;
fx\src\data\System\Data\DataTable.cs (1)
3158row[c] = DBNull.Value;
fx\src\data\System\Data\DataTableReader.cs (1)
698if (dc.DefaultValue != DBNull.Value)
fx\src\data\System\Data\DefaultValueTypeConverter.cs (2)
39else if (value == DBNull.Value) { 53return DBNull.Value;
fx\src\data\System\Data\Filter\BinaryNode.cs (41)
102if (val == DBNull.Value) { 269else if ((vLeft == DBNull.Value)||(vRight == DBNull.Value)) { 270return DBNull.Value; 286vLeft = vRight = DBNull.Value; 290object value = DBNull.Value; 617if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) || 618(vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))) 619return DBNull.Value; 623if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) || 624(vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))) 625return DBNull.Value; 629if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) || 630(vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))) 631return DBNull.Value; 635if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) || 636(vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))) 637return DBNull.Value; 641if (((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) || 642((vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))) 643return DBNull.Value; 647if (((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) || 648((vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))) 649return DBNull.Value; 654if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))){ 661if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))){ 674if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) 675return DBNull.Value; 696if ((vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight ))) 697return DBNull.Value; 722if ((vLeft != DBNull.Value) && (!DataStorage.IsObjectSqlNull(vLeft))) { 736if ((vRight == DBNull.Value)||(DataStorage.IsObjectSqlNull(vRight))) 739if ((vLeft == DBNull.Value)||(DataStorage.IsObjectSqlNull(vLeft))) 826if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) 827return DBNull.Value; 839if ((vRight == DBNull.Value)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))) 1225if ((vLeft == DBNull.Value)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) 1226return DBNull.Value; 1235if (vRight == DBNull.Value || DataStorage.IsObjectSqlNull(vRight)) 1236return DBNull.Value; 1280return DBNull.Value;
fx\src\data\System\Data\Filter\ConstNode.cs (1)
26this.val = DBNull.Value;
fx\src\data\System\Data\Filter\DataExpression.cs (2)
115if (result != DBNull.Value || StorageType.Uri < _storageType) { 163return DBNull.Value;
fx\src\data\System\Data\Filter\FunctionNode.cs (12)
125if ((argumentValues[i] == DBNull.Value) || (typeof(object) == funcs[info].parameters[i])) { 128return DBNull.Value; 308return DBNull.Value; 349return DBNull.Value; 389return DBNull.Value; 404return DBNull.Value; 417if (argumentValues[0] == DBNull.Value) { 418return DBNull.Value; 455if (argumentValues[0] == DBNull.Value || argumentValues[1] == DBNull.Value || argumentValues[2] == DBNull.Value) 456return DBNull.Value;
fx\src\data\System\Data\Filter\LookupNode.cs (1)
93return DBNull.Value;
fx\src\data\System\Data\Filter\UnaryNode.cs (3)
46object value = DBNull.Value; 49return DBNull.Value; 111value = DBNull.Value;
fx\src\data\System\Data\Filter\ZeroOpNode.cs (2)
38return DBNull.Value; 41return DBNull.Value;
fx\src\data\System\Data\ForeignKeyConstraint.cs (2)
306proposedKey[i] = DBNull.Value; 417proposedKey[i] = DBNull.Value;
fx\src\data\System\Data\Odbc\OdbcCommandBuilder.cs (2)
91if (DBNull.Value != bvalue) { 97if (DBNull.Value != bvalue) {
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (1)
1572this.dataCache[i] = DBNull.Value;
fx\src\data\System\Data\Odbc\odbcmetadatafactory.cs (10)
139if (odbcSource != DBNull.Value){ 152return DBNull.Value; 333if ((getTypeInfoValues[indexAUTO_UNIQUE_VALUE] == DBNull.Value) || 344if (getTypeInfoValues[indexNULLABLE] != DBNull.Value) { 357dataTypesRow[isNullableColumn] = DBNull.Value; 362if ( DBNull.Value != getTypeInfoValues[indexSEARCHABLE]){ 393if (getTypeInfoValues[indexMAXIMUM_SCALE] != DBNull.Value ) { 397if (getTypeInfoValues[indexMINIMUM_SCALE] != DBNull.Value ) { 401if (getTypeInfoValues[indexLITERAL_PREFIX] != DBNull.Value ) { 405if (getTypeInfoValues[indexLITERAL_SUFFIX] != DBNull.Value ) {
fx\src\data\System\Data\Odbc\OdbcParameter.cs (1)
842Value = DBNull.Value;
fx\src\data\System\Data\OleDb\ColumnBinding.cs (2)
249value = DBNull.Value; 390value = DBNull.Value;
fx\src\data\System\Data\OleDb\OleDbCommandBuilder.cs (2)
86if (DBNull.Value != bvalue) { 92if (DBNull.Value != bvalue) {
fx\src\data\System\Data\OleDb\OleDbDataAdapter.cs (1)
277value[0] = DBNull.Value;
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (3)
413newRow[isSearchable] = DBNull.Value; 414newRow[isSearchableWithLike] = DBNull.Value; 415if ( DBNull.Value != sourceRow[searchable]){
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
410if ((null != value) && (DBNull.Value != value) && (typeof(object) != destinationType.dataType)) {
fx\src\data\System\Data\OleDb\PropertyInfoSet.cs (1)
144case VarEnum.VT_NULL: return typeof(System.DBNull);
fx\src\data\System\Data\OleDb\RowBinding.cs (1)
184return ((null != value) ? value : DBNull.Value);
fx\src\data\System\Data\ProviderBase\DbMetaDataFactory.cs (3)
160restrictionParameter.Value = DBNull.Value; 499if (version != DBNull.Value) { 513if (version != DBNull.Value) {
fx\src\data\System\Data\ProviderBase\SchemaMapping.cs (6)
281_readerDataValues[i] = DBNull.Value; 991if (DBNull.Value != value) { 999if (DBNull.Value != value) { 1007if (DBNull.Value != value) { 1015if (DBNull.Value != value) { 1023if (DBNull.Value != value) {
fx\src\data\System\Data\Select.cs (4)
549if ((vLeft == DBNull.Value)||(expr.left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) 551if ((vRight == DBNull.Value)||(expr.right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))) 592case Operators.Is: c = (vLeft == DBNull.Value ? 0 : -1); break; 593case Operators.IsNot: c = (vLeft != DBNull.Value ? 0 : 1); break;
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (6)
643case StorageType.Empty: return DBNull.Value; 678return DBNull.Value; 683return DBNull.Value; 688return DBNull.Value; 699return DBNull.Value; 702case StorageType.Empty: return DBNull.Value;
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (3)
847return DBNull.Value; 902isNull = ((value == null) || (value == DBNull.Value)); 924return DBNull.Value;
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
5222data = DBNull.Value; 5835if ((null != val) && (DBNull.Value != val)) {
fx\src\data\System\Data\SqlClient\SqlCommandBuilder.cs (2)
174if (DBNull.Value != bvalue) { 180if (DBNull.Value != bvalue) {
fx\src\data\System\Data\SqlClient\SqlConnection.cs (1)
2245return DBNull.Value;
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
2588return DBNull.Value;
fx\src\data\System\Data\SqlClient\SqlDependency.cs (1)
1172if (value == null || value == DBNull.Value) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (8)
403else if (sqlType == typeof(object)) return DBNull.Value; 404else if (sqlType == typeof(IEnumerable<DbDataRecord>)) return DBNull.Value; 405else if (sqlType == typeof(DataTable)) return DBNull.Value; 406else if (sqlType == typeof(DateTime)) return DBNull.Value; 407else if (sqlType == typeof(TimeSpan)) return DBNull.Value; 408else if (sqlType == typeof(DateTimeOffset)) return DBNull.Value; 411return DBNull.Value; 493if ((null != comVal) && (DBNull.Value != comVal)) {
fx\src\data\System\Data\SqlClient\sqlmetadatafactory.cs (14)
111if (values[columnSizeIndex] != DBNull.Value) { 115if (values[isFixedLengthIndex] != DBNull.Value) { 121if (values[isNullableIndex] != DBNull.Value) { 125if ((values[assemblyNameIndex] != DBNull.Value) && 126(values[assemblyClassIndex] != DBNull.Value) && 127(values[versionMajorIndex] != DBNull.Value) && 128(values[versionMinorIndex] != DBNull.Value) && 129(values[versionBuildIndex] != DBNull.Value) && 130(values[versionRevisionIndex] != DBNull.Value)) { 146if (values[cultureInfoIndex] != DBNull.Value) { 151if (values[publicKeyIndex] != DBNull.Value) { 223if (values[columnSizeIndex] != DBNull.Value) { 229if (values[isNullableIndex] != DBNull.Value) { 233if (values[typeNameIndex] != DBNull.Value) {
fx\src\data\System\Data\SqlClient\SqlParameter.cs (5)
678if (_value == DBNull.Value) { 764_isNull = ((_value == null) || (_value == DBNull.Value) || ((_isSqlParameterSqlType) && (_valueAsINullable.IsNull))); 780_isNull = ((_value == null) || (_value == DBNull.Value) || ((_isSqlParameterSqlType) && (_valueAsINullable.IsNull))); 1417if (null != _value && DBNull.Value != _value) { 1519if (DBNull.Value == GetCoercedValue()) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (3)
5984if ((null == value) || (DBNull.Value == value)) { 10514Debug.Assert((null != value) && (DBNull.Value != value), "unexpected missing or empty object"); 10747Debug.Assert((null != value) && (DBNull.Value != value), "unexpected missing or empty object");
fx\src\data\System\Data\XmlDataLoader.cs (8)
359row[column] = DBNull.Value; 387row[c] = DBNull.Value; 433row[c] = DBNull.Value; 785foundColumns[i] = DBNull.Value; // Assign DBNull if possible 1009c[row.tempRecord] = null != foundColumns[i] ? foundColumns[i] : DBNull.Value; 1035foundColumns[i] = DBNull.Value; // Assign DBNull if possible 1120columnValue = DBNull.Value; // change to DBNull; 1256foundColumns[column.Ordinal] = DBNull.Value;
fx\src\data\System\Data\XMLDiffLoader.cs (1)
300col[record] = DBNull.Value;
fx\src\data\System\Data\xmlsaver.cs (6)
2179object val = (table.XmlText == null ? DBNull.Value : row[table.XmlText, DataRowVersion.Original]); 2250if ((columnValue != DBNull.Value) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(columnValue))){ 2572if ((value != DBNull.Value) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(value))){ 2585if ((value != DBNull.Value) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(value))){ 2600if (((value == DBNull.Value) || (col.ImplementsINullable && DataStorage.IsObjectSqlNull(value))) && (col.ColumnMapping == MappingType.SimpleContent)) 2604if (((value != DBNull.Value) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(value)))&&(col.columnMapping != MappingType.Attribute)){
fx\src\data\System\NewXml\XmlDataDocument.cs (1)
2155Debug.Assert( oVal != null && ! ( oVal is DBNull ) );
fx\src\data\System\NewXml\XPathNodePointer.cs (1)
370if ( colVal == DBNull.Value )
System.Data.DataSetExtensions (10)
System\Data\DataRowComparer.cs (4)
34if (Object.ReferenceEquals(a, null) || Object.ReferenceEquals(a, DBNull.Value) || 35Object.ReferenceEquals(b, null) || Object.ReferenceEquals(b, DBNull.Value)) 48if (Object.ReferenceEquals(a, null) || Object.ReferenceEquals(a, DBNull.Value) || 49Object.ReferenceEquals(b, null) || Object.ReferenceEquals(b, DBNull.Value))
System\Data\DataRowExtensions.cs (6)
161row[columnIndex] = (object)value ?? DBNull.Value; 178row[columnName] = (object)value ?? DBNull.Value; 195row[column] = (object)value ?? DBNull.Value; 221return ((DBNull.Value == value) ? default(T) : (T)value); 226if (DBNull.Value == value) 235if (DBNull.Value == value)
System.Data.Entity (44)
System\Data\Common\DataRecord.cs (1)
425return (DBNull.Value == _values[ordinal]);
System\Data\Common\EntityUtil.cs (1)
1983if ((null == value) || (DBNull.Value == value)) {
System\Data\Common\Internal\Materialization\RecordState.cs (1)
293PendingColumnValues[i] = DBNull.Value;
System\Data\Common\Internal\Materialization\Translator.cs (1)
612private static readonly Expression DBNull_Value = Expression.Constant(DBNull.Value, typeof(object));
System\Data\Common\Utils\ByValueEqualityComparer.cs (4)
128Debug.Assert(!((object.ReferenceEquals(x, DBNull.Value)) && (object.ReferenceEquals(y,DBNull.Value))), "object.ReferenceEquals should catch the case when both values are dbnull"); 129if (object.ReferenceEquals(x, DBNull.Value)) 133if (object.ReferenceEquals(y, DBNull.Value))
System\Data\EntityClient\EntityCommand.cs (1)
831if (parameter.EdmType == null && parameter.DbType == DbType.Object && (parameter.Value == null || parameter.Value is DBNull))
System\Data\Mapping\Update\Internal\FunctionUpdateCommand.cs (1)
295if (DBNull.Value.Equals(m_rowsAffectedParameter.Value))
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (1)
540if (null == value || value == DBNull.Value || value.GetType() == clrPrimitiveType)
System\Data\Mapping\Update\Internal\PropagatorResult.cs (2)
270m_value = value ?? DBNull.Value; 292return NullIdentifier == this.Identifier && DBNull.Value == m_value;
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (2)
513value = value ?? DBNull.Value; // records expect DBNull rather than null 528if (DBNull.Value.Equals(value))
System\Data\Objects\EntityEntry.cs (8)
1313return ((StateManagerValue)retValue).originalValue ?? DBNull.Value; 1376return retValue ?? DBNull.Value; 3018if (newValue == null || newValue == DBNull.Value) 3289object fieldValue = member.GetValue(value) ?? DBNull.Value; 3295if (existing == DBNull.Value) 3299else if (fieldValue != DBNull.Value) 3335(((object)DBNull.Value == newFieldValue) || 3336((object)DBNull.Value == existing) ||
System\Data\Objects\Internal\ComplexTypeMaterializer.cs (2)
81return ((DBNull.Value != value) ? value : null); 86return ((DBNull.Value != record) ? CreateComplexRecursive((IExtendedDataRecord)record, existing) : existing);
System\Data\Objects\Internal\ForeignKeyFactory.cs (2)
105return keyValue == DBNull.Value ? null : new EntityKey(principalEntitySet, keyValue); 123if (value == DBNull.Value)
System\Data\Objects\Internal\ObjectQueryExecutionPlan.cs (1)
183entityCommand.Parameters[index].Value = parameter.Value ?? DBNull.Value;
System\Data\Objects\ObjectContext.cs (4)
2784entityParameter.Value = objectParameter.Value ?? DBNull.Value; 2786if (DBNull.Value == entityParameter.Value || 3233dbParameters[i].Value = parameters[i] ?? DBNull.Value; 3332if (_entityParameter.Value != DBNull.Value && _objectParameter.MappableType.IsEnum)
System\Data\Objects\ObjectStateEntryBaseUpdatableDataRecord.cs (2)
378return (GetValue(ordinal) == DBNull.Value); 526SetRecordValue(ordinal, DBNull.Value);
System\Data\Objects\ObjectStateEntryDbDataRecord.cs (1)
253return (GetValue(ordinal) == DBNull.Value);
System\Data\Objects\ObjectStateEntryOriginalDbUpdatableDataRecord.cs (2)
88object fieldValue = value ?? DBNull.Value; 107if ((object)DBNull.Value == fieldValue &&
System\Data\Objects\ObjectStateManagerMetadata.cs (1)
129if (DBNull.Value == value)
System\Data\Query\ResultAssembly\BridgeDataRecord.cs (3)
454if (result != DBNull.Value) { 458result = DBNull.Value; 639bool result = (DBNull.Value == columnValue);
System\Data\SqlClient\SqlProviderServices.cs (3)
118parameter = CreateSqlParameter(functionParameter.Name, functionParameter.TypeUsage, functionParameter.Mode, DBNull.Value, preventTruncation, sqlVersion); 132parameter = CreateSqlParameter(queryParameter.Key, parameterType, ParameterMode.In, DBNull.Value, preventTruncation, sqlVersion); 414value != DBNull.Value &&
System.Data.Linq (2)
SqlClient\SqlProvider.cs (1)
1854if (parameterValue == DBNull.Value) parameterValue = null;
SqlClient\SqlTypeSystemProvider.cs (1)
1037return DBNull.Value;
System.Data.Services (14)
System\Data\Services\Epm\EpmContentSerializer.cs (4)
173currentValue = currentValue == DBNull.Value ? null : currentValue; 180currentValue = currentValue == DBNull.Value ? null : currentValue; 198currentValue = currentValue == DBNull.Value ? null : currentValue; 232Debug.Assert(currentValue != DBNull.Value, "currentValue != DBNull.Value -- we have converted DBNull to null");
System\Data\Services\Epm\EpmCustomContentWriterNodeData.cs (1)
215if (propertyValue == null || propertyValue == DBNull.Value)
System\Data\Services\Serializers\JsonSerializer.cs (2)
702if (propertyValue == null || propertyValue == DBNull.Value) 727if (propertyValue == null || propertyValue == DBNull.Value)
System\Data\Services\Serializers\PlainXmlSerializer.cs (1)
313if (value == null || value == DBNull.Value)
System\Data\Services\Serializers\Serializer.cs (2)
1194if (value == DBNull.Value) 1240if (value == DBNull.Value)
System\Data\Services\Serializers\SyndicationSerializer.cs (3)
884if (value == null || value == DBNull.Value) 974if (propertyValue == null || propertyValue == DBNull.Value) 993if (propertyValue == DBNull.Value)
System\Data\Services\WebUtil.cs (1)
1500if (result == DBNull.Value)
System.Management (17)
InteropClasses\WMIInterop.cs (1)
166pVal = DBNull.Value;
managementbaseobject.cs (4)
473classPath.Server = (string)(serverName is System.DBNull ? "" : serverName); 474classPath.NamespacePath = (string)(scopeName is System.DBNull ? "" : scopeName); 475classPath.ClassName = (string)(className is System.DBNull ? "" : className); 834if (val is System.DBNull)
managementclass.cs (1)
93 if (className != System.DBNull.Value)
managementobject.cs (4)
725classPath.Server = (string)(serverName is System.DBNull ? "" : serverName); 726classPath.NamespacePath = (string)(scopeName is System.DBNull ? "" : scopeName); 727classPath.ClassName = (string)(className is System.DBNull ? "" : className); 2691path = (System.DBNull.Value != val) ? (new ManagementPath((string)val)) : (new ManagementPath ());
managementpath.cs (2)
109if ((status < 0) || (val == System.DBNull.Value)) 122if (System.DBNull.Value == val)
property.cs (3)
276 if ((System.DBNull.Value != wmiValue) && (null != wmiValue)) 389 object wmiValue = System.DBNull.Value; 621 object wmiValue = System.DBNull.Value;
propertyset.cs (1)
498 object dummyObj = System.DBNull.Value;
qualifier.cs (1)
101 object wmiValue = System.DBNull.Value;
System.Runtime.Serialization (1)
System\Runtime\Serialization\Globals.cs (1)
1090typeOfDBNull = typeof(DBNull);
System.ServiceModel (4)
System\ServiceModel\Channels\UriPrefixTable.cs (3)
104item = value == DBNull.Value ? null : (TItem)value; 111Fx.Assert(item != DBNull.Value, "Can't add DBNull to UriPrefixTable."); 114this.lookupCache.Add(key, item ?? (object)DBNull.Value);
System\ServiceModel\ComIntegration\ComPlusTypeLoader.cs (1)
196operationDescription.KnownTypes.Add(typeof(DBNull));
System.ServiceModel.Internals (1)
System\Runtime\Collections\HopperCache.cs (1)
80if (this.weak && !object.ReferenceEquals(value, DBNull.Value))
System.Web (14)
Handlers\TraceHandler.cs (2)
471if (!(errormessage is System.DBNull)) 473if (!(errorstack is System.DBNull))
Management\SqlServices.cs (1)
563if (res == null || res == System.DBNull.Value) {
Security\SQLMembershipProvider.cs (1)
1828param.Value = DBNull.Value;
UI\DataBinder.cs (3)
130if ((value == null) || (value == System.DBNull.Value)) { 189if ((value == null) || (value == System.DBNull.Value)) { 296if ((value == null) || (value == System.DBNull.Value)) {
UI\WebControls\ObjectDataSource.cs (2)
836if ((entry.Value != null) && (entry.Value != DBNull.Value)) { 841if (entry.Value == DBNull.Value) {
UI\WebControls\ObjectDataSourceView.cs (1)
1586parameterValue = DBNull.Value;
UI\WebControls\Parameter.cs (1)
287return DBNull.Value;
UI\WebControls\SqlDataSource.cs (2)
895if ((entry.Value != null) && (entry.Value != DBNull.Value)) { 900if (entry.Value == DBNull.Value) {
UI\WebControls\SqlDataSourceView.cs (1)
1448parameter.Value = DBNull.Value;
System.Web.DataVisualization (11)
Common\DataManager\DataPoint.cs (4)
697if (xValueObj is System.DBNull || xValueObj == null) 708if (yValuesObj[i] is System.DBNull || yValuesObj[i] == null) 953 if(val is System.DBNull || val == null) 2193 if(yValue[i] == null || yValue[i] is System.DBNull)
Common\DataManager\DataSeries.cs (1)
937 type == typeof(System.DBNull) ||
Common\General\Chart.cs (3)
844 if(xValueObj is System.DBNull || xValueObj == null) 855 if(yValuesObj[0] is System.DBNull || yValuesObj[0] == null) 868 if(yValuesObj[i] is System.DBNull || yValuesObj[i] == null)
Common\General\DataManipulator.cs (3)
1024xValue = DBNull.Value; 1043xValue = DBNull.Value; 1055 yValue = DBNull.Value;
System.Web.Entity (2)
System\Data\WebControls\EntityDataSourceUtil.cs (1)
331return typeof(DBNull);
System\Data\WebControls\EntityDataSourceView.cs (1)
1689return DBNull.Value;
System.Web.Extensions (1)
Script\Serialization\JavaScriptSerializer.cs (1)
403if (o == null || DBNull.Value.Equals(o)) {
System.Web.Mobile (1)
UI\MobileControls\ObjectListField.cs (1)
215if ((data != null) && (data != System.DBNull.Value))
System.Windows.Forms (23)
winforms\Managed\System\WinForms\Binding.cs (3)
683if (!(cevent.Value is System.DBNull) && cevent.Value != null && cevent.DesiredType != null && !cevent.DesiredType.IsInstanceOfType(cevent.Value) && (cevent.Value is IConvertible)) { 698if (!(cevent.Value is System.DBNull) && cevent.DesiredType != null && !cevent.DesiredType.IsInstanceOfType(cevent.Value) && (cevent.Value is IConvertible)) { 743if (e.Value != null && (e.Value.GetType().IsSubclassOf(type) || e.Value.GetType() == type || e.Value is System.DBNull))
winforms\Managed\System\WinForms\DataGridTextBoxColumn.cs (1)
530if (value is System.DBNull)
winforms\Managed\System\WinForms\DataGridViewCellStyle.cs (3)
179return System.DBNull.Value; 191if (value == System.DBNull.Value && 337return this.Properties.GetObject(PropDataSourceNullValue) == System.DBNull.Value;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (6)
1148if (value == null || ((this.ValueType != null && !this.ValueType.IsAssignableFrom(value.GetType())) && value != System.DBNull.Value)) 1179if (value == System.DBNull.Value) 1181displayValue = System.DBNull.Value; 1210value != System.DBNull.Value && 2684if (originalValue == System.DBNull.Value) 2686value = System.DBNull.Value;
winforms\Managed\System\WinForms\Formatter.cs (9)
22static private Object defaultDataSourceNullValue = System.DBNull.Value; 51value = System.DBNull.Value; 96if (value == System.DBNull.Value || value == null) { 240if (result == System.DBNull.Value) { 268if (EqualsFormattedNullValue(value, formattedNullValue, formatInfo) || value == System.DBNull.Value) { 269return System.DBNull.Value; 296return DBNull.Value; 449value == System.DBNull.Value || 460if (dataSourceNullValue == null || dataSourceNullValue == DBNull.Value)
winforms\Managed\System\WinForms\ListControl.cs (1)
592return (string) Formatter.FormatObject(filteredItem, typeof(String), this.DisplayMemberConverter, stringTypeConverter, formatString, formatInfo, null, System.DBNull.Value);
System.Windows.Forms.DataVisualization (11)
Common\DataManager\DataPoint.cs (4)
697if (xValueObj is System.DBNull || xValueObj == null) 708if (yValuesObj[i] is System.DBNull || yValuesObj[i] == null) 953 if(val is System.DBNull || val == null) 2193 if(yValue[i] == null || yValue[i] is System.DBNull)
Common\DataManager\DataSeries.cs (1)
937 type == typeof(System.DBNull) ||
Common\General\Chart.cs (3)
844 if(xValueObj is System.DBNull || xValueObj == null) 855 if(yValuesObj[0] is System.DBNull || yValuesObj[0] == null) 868 if(yValuesObj[i] is System.DBNull || yValuesObj[i] == null)
Common\General\DataManipulator.cs (3)
1024xValue = DBNull.Value; 1043xValue = DBNull.Value; 1055 yValue = DBNull.Value;
System.Workflow.Runtime (3)
Tracking\SqlTrackingQuery.cs (1)
138if (DBNull.Value == reader[4])
Tracking\SqlTrackingService.cs (2)
2109command.Parameters.Add(DbResourceAllocator.NewDbParameter("@Order", DBNull.Value)); 2131command.Parameters.Add(DbResourceAllocator.NewDbParameter("@Order", DBNull.Value));
System.Xml (15)
System\Xml\Serialization\Mappings.cs (1)
48get { return defaultValue != null && defaultValue != DBNull.Value; }
System\Xml\Serialization\SoapReflectionImporter.cs (1)
683if (a.SoapDefaultValue == null || a.SoapDefaultValue == DBNull.Value) return null;
System\Xml\Serialization\XmlCodeExporter.cs (3)
317return DBNull.Value; 370return DBNull.Value; 430if (value == DBNull.Value) {
System\Xml\Serialization\XmlReflectionImporter.cs (1)
1859if (a.XmlDefaultValue == null || a.XmlDefaultValue == DBNull.Value) return null;
System\Xml\Serialization\XmlSchemaExporter.cs (1)
778if (value == null || value == DBNull.Value)
System\Xml\Serialization\XmlSerializationReader.cs (1)
4285if (element.Default != null && element.Default != DBNull.Value && element.Mapping.TypeDesc.IsValueType) {
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3035if (element.Default != null && element.Default != DBNull.Value && element.Mapping.TypeDesc.IsValueType) {
System\Xml\Serialization\XmlSerializationWriter.cs (2)
1404bool hasDefault = defaultValue != null && defaultValue != DBNull.Value; 1476bool hasDefault = defaultValue != null && defaultValue != DBNull.Value && mapping.TypeDesc.HasDefaultSupport;
System\Xml\Serialization\XmlSerializationWriterILGen.cs (4)
85bool hasDefault = defaultValue != null && defaultValue != DBNull.Value; 177bool hasDefault = defaultValue != null && defaultValue != DBNull.Value && mapping.TypeDesc.HasDefaultSupport; 2313if (type == typeof(DBNull)) { 2314FieldInfo DBNull_Value = typeof(DBNull).GetField("Value", CodeGenerator.StaticBindingFlags);