Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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) { } } } // 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); } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] 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
- ParameterModifier.cs
- MessageEncoderFactory.cs
- OleDbTransaction.cs
- PassportIdentity.cs
- ServiceDurableInstance.cs
- fixedPageContentExtractor.cs
- DiscoveryVersion.cs
- RijndaelManagedTransform.cs
- Action.cs
- FragmentQueryProcessor.cs
- TagPrefixInfo.cs
- DBCommandBuilder.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SqlDataSourceSelectingEventArgs.cs
- XamlWriter.cs
- PropertyConverter.cs
- IndexedString.cs
- ConcurrencyBehavior.cs
- TextWriter.cs
- Trigger.cs
- UnsafePeerToPeerMethods.cs
- CodeComment.cs
- PriorityItem.cs
- ProcessHost.cs
- AlgoModule.cs
- ConfigXmlDocument.cs
- clipboard.cs
- RegisterInfo.cs
- HtmlProps.cs
- DefaultProxySection.cs
- ApplicationException.cs
- ScriptControlManager.cs
- ConcatQueryOperator.cs
- Enum.cs
- HttpDebugHandler.cs
- EntityParameter.cs
- HtmlDocument.cs
- MatrixTransform.cs
- AutomationProperty.cs
- CompoundFileIOPermission.cs
- ByValueEqualityComparer.cs
- Point3DCollectionConverter.cs
- DynamicEntity.cs
- ArrayWithOffset.cs
- InputMethodStateChangeEventArgs.cs
- XmlArrayItemAttribute.cs
- MultipleCopiesCollection.cs
- SystemResourceHost.cs
- MetadataCache.cs
- VSWCFServiceContractGenerator.cs
- HashHelper.cs
- PropertyEmitterBase.cs
- UserMapPath.cs
- DomainConstraint.cs
- StreamInfo.cs
- AssociationProvider.cs
- UnionCodeGroup.cs
- KoreanCalendar.cs
- AlgoModule.cs
- DataRowCollection.cs
- DispatchProxy.cs
- Viewport3DAutomationPeer.cs
- EntityViewContainer.cs
- QuotedPrintableStream.cs
- IntegerFacetDescriptionElement.cs
- KeyBinding.cs
- FormViewCommandEventArgs.cs
- Span.cs
- PropertyDescriptorCollection.cs
- DataView.cs
- ContextMenuAutomationPeer.cs
- contentDescriptor.cs
- CatalogZoneBase.cs
- BaseParagraph.cs
- Imaging.cs
- Preprocessor.cs
- _SslState.cs
- DescendentsWalker.cs
- CoreChannel.cs
- GeometryDrawing.cs
- RequiredFieldValidator.cs
- ComboBox.cs
- AuthorizationSection.cs
- DataGridBoolColumn.cs
- OverlappedAsyncResult.cs
- Unit.cs
- SQLDateTime.cs
- Mapping.cs
- ReferencedCollectionType.cs
- WebBrowserSiteBase.cs
- ToolStripInSituService.cs
- ReadOnlyDataSourceView.cs
- ToolbarAUtomationPeer.cs
- NumericUpDownAcceleration.cs
- TreePrinter.cs
- DataColumnPropertyDescriptor.cs
- RefreshEventArgs.cs
- QuotedPrintableStream.cs
- WebBrowserEvent.cs
- GroupBoxRenderer.cs