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
- RequestTimeoutManager.cs
- DataGridParentRows.cs
- DoubleAnimationUsingKeyFrames.cs
- WebPartConnectionsCloseVerb.cs
- GeometryModel3D.cs
- CategoryValueConverter.cs
- OleDbParameter.cs
- HTMLTagNameToTypeMapper.cs
- CompensationExtension.cs
- CodeExpressionCollection.cs
- TileBrush.cs
- TimeSpanFormat.cs
- UnknownBitmapEncoder.cs
- EntitySqlQueryCacheEntry.cs
- SqlIdentifier.cs
- SchemaImporterExtension.cs
- ParserExtension.cs
- Listen.cs
- AppSettingsSection.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- PenContexts.cs
- SQLBinaryStorage.cs
- SqlError.cs
- IsolatedStorageFileStream.cs
- XmlDataContract.cs
- RegexWorker.cs
- ColorMatrix.cs
- SHA512Managed.cs
- ImageSourceTypeConverter.cs
- HtmlLink.cs
- Animatable.cs
- StateRuntime.cs
- StringCollection.cs
- LassoHelper.cs
- OptimalTextSource.cs
- WpfXamlMember.cs
- CalendarDay.cs
- shaperfactoryquerycachekey.cs
- XmlWriterTraceListener.cs
- RemoteWebConfigurationHostServer.cs
- XmlValueConverter.cs
- ListChangedEventArgs.cs
- DescriptionAttribute.cs
- NamespaceTable.cs
- DataServiceQueryOfT.cs
- ISAPIApplicationHost.cs
- RotationValidation.cs
- InstanceCreationEditor.cs
- DataGridViewButtonColumn.cs
- ConditionalExpression.cs
- DataGridViewCellCancelEventArgs.cs
- AsyncStreamReader.cs
- COM2PictureConverter.cs
- PasswordDeriveBytes.cs
- LocalValueEnumerator.cs
- View.cs
- OracleString.cs
- BindingMAnagerBase.cs
- IODescriptionAttribute.cs
- IconHelper.cs
- X509SecurityTokenParameters.cs
- WindowsGraphics2.cs
- CalendarKeyboardHelper.cs
- ErrorItem.cs
- PerformanceCounterManager.cs
- TextProviderWrapper.cs
- CursorConverter.cs
- COAUTHINFO.cs
- DrawingServices.cs
- CryptoKeySecurity.cs
- Hex.cs
- DbConnectionStringBuilder.cs
- MetadataArtifactLoaderResource.cs
- CorrelationActionMessageFilter.cs
- BitmapEffectInput.cs
- ErrorWebPart.cs
- complextypematerializer.cs
- ManagedWndProcTracker.cs
- HttpListener.cs
- ContentWrapperAttribute.cs
- PositiveTimeSpanValidator.cs
- MembershipValidatePasswordEventArgs.cs
- ProtocolsConfigurationEntry.cs
- DesignerActionItemCollection.cs
- GC.cs
- DrawingDrawingContext.cs
- HttpListenerTimeoutManager.cs
- WebPartCatalogAddVerb.cs
- UserPrincipalNameElement.cs
- NetworkAddressChange.cs
- CollectionViewProxy.cs
- ButtonAutomationPeer.cs
- ReliabilityContractAttribute.cs
- ChangeDirector.cs
- RelatedView.cs
- DynamicQueryableWrapper.cs
- ConfigurationSection.cs
- XmlSchemaSimpleTypeList.cs
- StylusCaptureWithinProperty.cs
- StrokeNodeEnumerator.cs