Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResXResourceReader.cs
- AuthorizationSection.cs
- SystemIPInterfaceStatistics.cs
- MoveSizeWinEventHandler.cs
- AnnotationStore.cs
- ApplicationSecurityInfo.cs
- SqlBooleanizer.cs
- ExtentJoinTreeNode.cs
- ChtmlCalendarAdapter.cs
- VScrollProperties.cs
- Converter.cs
- WorkerRequest.cs
- SchemaImporterExtensionElement.cs
- JoinGraph.cs
- TreeBuilder.cs
- RuleSetReference.cs
- ImpersonateTokenRef.cs
- ListDictionary.cs
- DataBindEngine.cs
- DependencyPropertyAttribute.cs
- SmtpAuthenticationManager.cs
- BitmapEffectInput.cs
- FontStyle.cs
- DataColumnCollection.cs
- _UriSyntax.cs
- EditorAttributeInfo.cs
- _BaseOverlappedAsyncResult.cs
- ClientRolePrincipal.cs
- SymLanguageVendor.cs
- TransactionFlowBindingElement.cs
- DependencyPropertyAttribute.cs
- ConfigXmlWhitespace.cs
- ConfigurationElementProperty.cs
- HttpValueCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- SurrogateDataContract.cs
- NullableIntAverageAggregationOperator.cs
- MetadataSection.cs
- ThumbAutomationPeer.cs
- ComponentChangingEvent.cs
- SpotLight.cs
- CodeMemberProperty.cs
- EventDescriptorCollection.cs
- RawAppCommandInputReport.cs
- GenerateTemporaryTargetAssembly.cs
- Identity.cs
- PopOutPanel.cs
- EnumMember.cs
- ControlSerializer.cs
- HideDisabledControlAdapter.cs
- AssemblyName.cs
- EventLogPermissionEntry.cs
- HostingEnvironmentSection.cs
- IHttpResponseInternal.cs
- XmlRootAttribute.cs
- Rfc2898DeriveBytes.cs
- SystemColors.cs
- SettingsBindableAttribute.cs
- ConsoleKeyInfo.cs
- ObjectAssociationEndMapping.cs
- ProcessHostFactoryHelper.cs
- WindowsGraphicsCacheManager.cs
- BehaviorEditorPart.cs
- UntypedNullExpression.cs
- BindStream.cs
- Triangle.cs
- MulticastNotSupportedException.cs
- RegisteredHiddenField.cs
- HandlerFactoryWrapper.cs
- Visitors.cs
- ContextBase.cs
- HelpEvent.cs
- LayoutTable.cs
- DefaultAutoFieldGenerator.cs
- XDRSchema.cs
- Int16.cs
- ErasingStroke.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- UnmanagedHandle.cs
- SolidBrush.cs
- OdbcHandle.cs
- AbstractSvcMapFileLoader.cs
- XmlILIndex.cs
- XmlSchemaComplexContentExtension.cs
- SqlDataAdapter.cs
- DebugTracing.cs
- WebPartConnectVerb.cs
- PropertyValueChangedEvent.cs
- XmlEntityReference.cs
- IndexOutOfRangeException.cs
- EventLogPermission.cs
- TextServicesDisplayAttribute.cs
- SchemaTableOptionalColumn.cs
- InstanceOwnerException.cs
- ComponentEvent.cs
- X509Chain.cs
- LookupBindingPropertiesAttribute.cs
- DockProviderWrapper.cs
- LayoutEngine.cs
- XmlTextReader.cs