Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / ArgumentNullException.cs / 1 / 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); } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] protected ArgumentNullException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UserPrincipalNameElement.cs
- EventListenerClientSide.cs
- MatrixCamera.cs
- ObjectCloneHelper.cs
- MarkedHighlightComponent.cs
- SocketException.cs
- QilFunction.cs
- CheckedPointers.cs
- InternalControlCollection.cs
- ColorConverter.cs
- DataObjectSettingDataEventArgs.cs
- BrowsableAttribute.cs
- RegisteredScript.cs
- cache.cs
- ColorMap.cs
- XsltContext.cs
- MemberRelationshipService.cs
- MediaPlayerState.cs
- SiteMapNodeItemEventArgs.cs
- DataGridViewLinkColumn.cs
- Size3D.cs
- CuspData.cs
- SafeArrayRankMismatchException.cs
- RuntimeDelegateArgument.cs
- MobileTextWriter.cs
- ProxyHelper.cs
- ProfileSettings.cs
- WindowsGrip.cs
- TableLayoutPanelDesigner.cs
- BaseParaClient.cs
- SqlFacetAttribute.cs
- Profiler.cs
- TreeNodeMouseHoverEvent.cs
- XmlNotation.cs
- ConfigXmlComment.cs
- QilInvokeEarlyBound.cs
- StateDesigner.LayoutSelectionGlyph.cs
- XmlSchemaSet.cs
- metadatamappinghashervisitor.cs
- DataGridColumn.cs
- DesignerEventService.cs
- ADRoleFactory.cs
- SelectedPathEditor.cs
- TreeViewBindingsEditor.cs
- Point4DConverter.cs
- XPathDescendantIterator.cs
- DataGridDesigner.cs
- BitSet.cs
- SessionChannels.cs
- NativeMethods.cs
- PingReply.cs
- OLEDB_Util.cs
- DashStyles.cs
- _ListenerRequestStream.cs
- PersonalizationState.cs
- RequestNavigateEventArgs.cs
- HtmlInputPassword.cs
- PartialCachingAttribute.cs
- TraceListener.cs
- SiteMapDataSource.cs
- Rect3D.cs
- LinqDataSourceValidationException.cs
- AspNetRouteServiceHttpHandler.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- TextTreeInsertElementUndoUnit.cs
- SafeProcessHandle.cs
- NavigationProperty.cs
- UnsafeNativeMethods.cs
- TripleDES.cs
- DataGridGeneralPage.cs
- OperatorExpressions.cs
- GestureRecognizer.cs
- ArrayTypeMismatchException.cs
- ToolBarButtonClickEvent.cs
- PeerTransportElement.cs
- CodeCommentStatementCollection.cs
- SqlCrossApplyToCrossJoin.cs
- PartialCachingControl.cs
- SecureConversationSecurityTokenParameters.cs
- DisplayInformation.cs
- DataGridViewRowCancelEventArgs.cs
- TextViewSelectionProcessor.cs
- WebPermission.cs
- ReadWriteSpinLock.cs
- TextTreeFixupNode.cs
- SimpleHandlerBuildProvider.cs
- AutoResizedEvent.cs
- SymmetricSecurityBindingElement.cs
- ConfigXmlDocument.cs
- FastEncoderStatics.cs
- SiteMapNode.cs
- IItemProperties.cs
- ScrollChrome.cs
- SoapDocumentServiceAttribute.cs
- Brush.cs
- ICspAsymmetricAlgorithm.cs
- InternalDispatchObject.cs
- XmlWrappingReader.cs
- _ProxyChain.cs
- listitem.cs