Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ApplicationServicesHostFactory.cs
- WebPartConnectionsDisconnectVerb.cs
- WindowsSpinner.cs
- DataSourceView.cs
- TrackingServices.cs
- RealProxy.cs
- ProtocolException.cs
- GuidelineCollection.cs
- SelectionItemProviderWrapper.cs
- PeerChannelListener.cs
- StateManagedCollection.cs
- XmlDataSourceView.cs
- CodeAttributeArgument.cs
- PresentationAppDomainManager.cs
- AggregatePushdown.cs
- DrawingContextDrawingContextWalker.cs
- SafeLibraryHandle.cs
- Array.cs
- MetadataCache.cs
- GeneralTransform3D.cs
- DataGridView.cs
- SecurityContext.cs
- OpenFileDialog.cs
- DbException.cs
- PrintPreviewGraphics.cs
- ProtectedUri.cs
- AuthorizationRuleCollection.cs
- StringInfo.cs
- mansign.cs
- DataGridColumnCollection.cs
- SectionVisual.cs
- WindowsToolbarAsMenu.cs
- Cloud.cs
- XmlCodeExporter.cs
- KeyFrames.cs
- ConfigurationStrings.cs
- HeaderCollection.cs
- PropertyGroupDescription.cs
- BooleanAnimationBase.cs
- DataContractAttribute.cs
- TaiwanCalendar.cs
- TrackingDataItemValue.cs
- AxHost.cs
- VirtualPathData.cs
- SimpleHandlerFactory.cs
- RangeBaseAutomationPeer.cs
- TextBox.cs
- ClosableStream.cs
- Border.cs
- TreeViewEvent.cs
- XPathNodeHelper.cs
- OracleParameterCollection.cs
- GeometryModel3D.cs
- TextClipboardData.cs
- ProvidePropertyAttribute.cs
- SymbolEqualComparer.cs
- SqlDataReaderSmi.cs
- ConsoleCancelEventArgs.cs
- ThreadAbortException.cs
- InlinedAggregationOperator.cs
- BinaryFormatterSinks.cs
- DataGridViewRowsAddedEventArgs.cs
- CachedResourceDictionaryExtension.cs
- XmlChildNodes.cs
- RawStylusInputCustomData.cs
- fixedPageContentExtractor.cs
- XhtmlBasicSelectionListAdapter.cs
- UTF8Encoding.cs
- ToolStripDropDown.cs
- TextFormatterHost.cs
- Thread.cs
- XmlUtilWriter.cs
- IdentityReference.cs
- EntityCommand.cs
- XPathNode.cs
- ClientSettingsProvider.cs
- MetadataSource.cs
- WebControlAdapter.cs
- Vector3DConverter.cs
- EntityEntry.cs
- SqlDataSourceSelectingEventArgs.cs
- FlowchartStart.xaml.cs
- XmlQuerySequence.cs
- EndpointIdentity.cs
- WebPartTransformerAttribute.cs
- Compress.cs
- Point3DAnimation.cs
- AsyncResult.cs
- ClientUtils.cs
- HelpFileFileNameEditor.cs
- PerfCounterSection.cs
- BitmapCodecInfoInternal.cs
- ListControl.cs
- IdentifierService.cs
- DecoderNLS.cs
- _StreamFramer.cs
- PackagingUtilities.cs
- DataControlPagerLinkButton.cs
- NumericUpDownAcceleration.cs
- WindowsSpinner.cs