Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / NullReferenceException.cs / 1305376 / NullReferenceException.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: NullReferenceException
**
**
** Purpose: Exception class for dereferencing a null reference.
**
**
=============================================================================*/
namespace System {
using System;
using System.Runtime.Serialization;
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable]
public class NullReferenceException : SystemException {
public NullReferenceException()
: base(Environment.GetResourceString("Arg_NullReferenceException")) {
SetErrorCode(__HResults.COR_E_NULLREFERENCE);
}
public NullReferenceException(String message)
: base(message) {
SetErrorCode(__HResults.COR_E_NULLREFERENCE);
}
public NullReferenceException(String message, Exception innerException)
: base(message, innerException) {
SetErrorCode(__HResults.COR_E_NULLREFERENCE);
}
[System.Security.SecuritySafeCritical] // auto-generated
protected NullReferenceException(SerializationInfo info, StreamingContext context) : base(info, context) {}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: NullReferenceException
**
**
** Purpose: Exception class for dereferencing a null reference.
**
**
=============================================================================*/
namespace System {
using System;
using System.Runtime.Serialization;
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable]
public class NullReferenceException : SystemException {
public NullReferenceException()
: base(Environment.GetResourceString("Arg_NullReferenceException")) {
SetErrorCode(__HResults.COR_E_NULLREFERENCE);
}
public NullReferenceException(String message)
: base(message) {
SetErrorCode(__HResults.COR_E_NULLREFERENCE);
}
public NullReferenceException(String message, Exception innerException)
: base(message, innerException) {
SetErrorCode(__HResults.COR_E_NULLREFERENCE);
}
[System.Security.SecuritySafeCritical] // auto-generated
protected NullReferenceException(SerializationInfo info, StreamingContext context) : base(info, context) {}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TraceEventCache.cs
- TimeSpanHelper.cs
- ObjectNotFoundException.cs
- ThrowOnMultipleAssignment.cs
- SequentialWorkflowHeaderFooter.cs
- UpdateProgress.cs
- WorkflowViewStateService.cs
- MobileControlDesigner.cs
- MessageQuerySet.cs
- BasePattern.cs
- DataSetFieldSchema.cs
- XmlTextAttribute.cs
- InheritanceRules.cs
- DbMetaDataFactory.cs
- DataGridParentRows.cs
- PropertyChangedEventManager.cs
- TriggerCollection.cs
- HeaderCollection.cs
- versioninfo.cs
- ActiveDocumentEvent.cs
- EdmError.cs
- _SafeNetHandles.cs
- UriTemplateDispatchFormatter.cs
- TemplateNameScope.cs
- Win32Native.cs
- securitycriticaldataformultiplegetandset.cs
- CompilationLock.cs
- SystemIPv4InterfaceProperties.cs
- BamlCollectionHolder.cs
- UnsafeNativeMethods.cs
- NavigationFailedEventArgs.cs
- DateTimeValueSerializer.cs
- DatatypeImplementation.cs
- PropertyDescriptor.cs
- TerminateDesigner.cs
- XamlBrushSerializer.cs
- XpsSerializerWriter.cs
- UnitControl.cs
- UnmanagedHandle.cs
- XmlSchemaException.cs
- RefType.cs
- Variable.cs
- InvokeMemberBinder.cs
- TraceContextRecord.cs
- XmlSchemaSearchPattern.cs
- SubMenuStyleCollection.cs
- SemanticResultValue.cs
- DecoderReplacementFallback.cs
- ListArgumentProvider.cs
- LockCookie.cs
- InvokeMemberBinder.cs
- DockEditor.cs
- Base64Encoder.cs
- ProjectedSlot.cs
- _SSPIWrapper.cs
- CultureNotFoundException.cs
- WindowsSidIdentity.cs
- DbDataSourceEnumerator.cs
- TextHidden.cs
- SiteMembershipCondition.cs
- SessionSwitchEventArgs.cs
- PassportAuthentication.cs
- NameValueSectionHandler.cs
- WebPartEditorOkVerb.cs
- BasicViewGenerator.cs
- SoapAttributeOverrides.cs
- TdsParser.cs
- WhereaboutsReader.cs
- TraceHwndHost.cs
- TrackingConditionCollection.cs
- ProxyRpc.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- DragAssistanceManager.cs
- MsmqAppDomainProtocolHandler.cs
- Parser.cs
- XmlSchemaAnnotated.cs
- DockPattern.cs
- EnumUnknown.cs
- IDQuery.cs
- IISUnsafeMethods.cs
- RootProfilePropertySettingsCollection.cs
- FrameworkElementFactory.cs
- ElementProxy.cs
- EdmSchemaAttribute.cs
- ObjectResult.cs
- EntityViewContainer.cs
- LoginName.cs
- FormatterServices.cs
- UserMapPath.cs
- MatrixStack.cs
- AutomationPeer.cs
- TableParagraph.cs
- CancellationToken.cs
- CryptoStream.cs
- FieldCollectionEditor.cs
- VisualTarget.cs
- ReferenceEqualityComparer.cs
- MetadataCache.cs
- BinaryObjectReader.cs
- AspNetSynchronizationContext.cs