Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / ArgumentNullException.cs / 1305376 / ArgumentNullException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: ArgumentNullException ** ** ** Purpose: Exception class for null arguments to a method. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; using System.Runtime.Remoting; using System.Security.Permissions; // The ArgumentException is thrown when an argument // is null when it shouldn't be. // [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ArgumentNullException : ArgumentException { // Creates a new ArgumentNullException with its message // string set to a default message explaining an argument was null. public ArgumentNullException() : base(Environment.GetResourceString("ArgumentNull_Generic")) { // Use E_POINTER - COM used that for null pointers. Description is "invalid pointer" SetErrorCode(__HResults.E_POINTER); } public ArgumentNullException(String paramName) : base(Environment.GetResourceString("ArgumentNull_Generic"), paramName) { SetErrorCode(__HResults.E_POINTER); } public ArgumentNullException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.E_POINTER); } public ArgumentNullException(String paramName, String message) : base(message, paramName) { SetErrorCode(__HResults.E_POINTER); } [System.Security.SecurityCritical] // auto-generated_required protected ArgumentNullException(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: ArgumentNullException ** ** ** Purpose: Exception class for null arguments to a method. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; using System.Runtime.Remoting; using System.Security.Permissions; // The ArgumentException is thrown when an argument // is null when it shouldn't be. // [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ArgumentNullException : ArgumentException { // Creates a new ArgumentNullException with its message // string set to a default message explaining an argument was null. public ArgumentNullException() : base(Environment.GetResourceString("ArgumentNull_Generic")) { // Use E_POINTER - COM used that for null pointers. Description is "invalid pointer" SetErrorCode(__HResults.E_POINTER); } public ArgumentNullException(String paramName) : base(Environment.GetResourceString("ArgumentNull_Generic"), paramName) { SetErrorCode(__HResults.E_POINTER); } public ArgumentNullException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.E_POINTER); } public ArgumentNullException(String paramName, String message) : base(message, paramName) { SetErrorCode(__HResults.E_POINTER); } [System.Security.SecurityCritical] // auto-generated_required protected ArgumentNullException(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
- AttributedMetaModel.cs
- RelationshipEnd.cs
- GridItemPattern.cs
- ListBindableAttribute.cs
- MultilineStringConverter.cs
- PointKeyFrameCollection.cs
- StructuredTypeEmitter.cs
- TableRow.cs
- Compiler.cs
- XmlSchemaAppInfo.cs
- XPathDocument.cs
- WindowsContainer.cs
- TcpClientChannel.cs
- WebWorkflowRole.cs
- SchemaLookupTable.cs
- DbConnectionClosed.cs
- ObjectMemberMapping.cs
- HandoffBehavior.cs
- XmlSchemaGroup.cs
- MoveSizeWinEventHandler.cs
- ClientType.cs
- CanonicalXml.cs
- ManagedFilter.cs
- Color.cs
- TrustLevelCollection.cs
- Maps.cs
- SmtpAuthenticationManager.cs
- ParserOptions.cs
- ArgumentFixer.cs
- AppDomainCompilerProxy.cs
- BinaryNode.cs
- ValidatingReaderNodeData.cs
- DirectionalLight.cs
- XmlSchemaAttributeGroupRef.cs
- MergeExecutor.cs
- BufferedGraphicsManager.cs
- UIElement3DAutomationPeer.cs
- StorageScalarPropertyMapping.cs
- WorkflowDefinitionDispenser.cs
- DayRenderEvent.cs
- TreeWalkHelper.cs
- PKCS1MaskGenerationMethod.cs
- CapabilitiesSection.cs
- Model3DGroup.cs
- ProfileProvider.cs
- WindowsStatusBar.cs
- OleDbErrorCollection.cs
- TextContainerChangeEventArgs.cs
- ObjectAssociationEndMapping.cs
- Evidence.cs
- TypeLibConverter.cs
- CollectionEditorDialog.cs
- updateconfighost.cs
- InstanceDescriptor.cs
- AudioDeviceOut.cs
- IdnElement.cs
- PolicyConversionContext.cs
- HtmlShim.cs
- TemplateControlBuildProvider.cs
- GcHandle.cs
- BinaryFormatter.cs
- ErrorWrapper.cs
- XPathAncestorQuery.cs
- DBNull.cs
- BrowsableAttribute.cs
- WebPartVerbsEventArgs.cs
- DataRowComparer.cs
- AssertFilter.cs
- SettingsPropertyWrongTypeException.cs
- Win32Native.cs
- CodeDirectoryCompiler.cs
- SystemInfo.cs
- AnnotationComponentChooser.cs
- RectValueSerializer.cs
- ListViewAutomationPeer.cs
- InstanceOwner.cs
- XXXOnTypeBuilderInstantiation.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- ClientBuildManager.cs
- XsdBuildProvider.cs
- LinkLabelLinkClickedEvent.cs
- SeparatorAutomationPeer.cs
- InvalidOleVariantTypeException.cs
- StorageInfo.cs
- Canvas.cs
- Cloud.cs
- URI.cs
- JpegBitmapDecoder.cs
- KeyValuePair.cs
- ListParaClient.cs
- TextElementEnumerator.cs
- PathGeometry.cs
- DesignerVerbCollection.cs
- AppDomainUnloadedException.cs
- LookupNode.cs
- XmlSchemaSimpleType.cs
- JoinGraph.cs
- HtmlElement.cs
- _NestedSingleAsyncResult.cs
- DockPanel.cs