Code:
/ 4.0 / 4.0 / 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. // ==++== // // 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
- WebResourceAttribute.cs
- XmlSchemaAnyAttribute.cs
- SemanticBasicElement.cs
- DynamicDataRouteHandler.cs
- SoapRpcServiceAttribute.cs
- GroupItemAutomationPeer.cs
- Model3D.cs
- PaperSource.cs
- propertyentry.cs
- XmlSchemaValidationException.cs
- TypeConverterHelper.cs
- FirstQueryOperator.cs
- ReverseComparer.cs
- DateTimeOffset.cs
- UnaryNode.cs
- DocumentScope.cs
- HashAlgorithm.cs
- Metafile.cs
- PersistenceProviderFactory.cs
- XamlDesignerSerializationManager.cs
- LinqDataSourceContextData.cs
- XmlValidatingReaderImpl.cs
- ReadContentAsBinaryHelper.cs
- AppSettingsExpressionBuilder.cs
- EnumConverter.cs
- OleStrCAMarshaler.cs
- FixedBufferAttribute.cs
- ButtonAutomationPeer.cs
- MobileControlPersister.cs
- SiteMapNodeCollection.cs
- DataGridViewSortCompareEventArgs.cs
- OdbcFactory.cs
- ZipIOExtraFieldElement.cs
- PaintEvent.cs
- SmtpFailedRecipientsException.cs
- LowerCaseStringConverter.cs
- BCLDebug.cs
- Int64Converter.cs
- PrinterUnitConvert.cs
- ConditionalWeakTable.cs
- ButtonColumn.cs
- DataFormats.cs
- Function.cs
- CodeMemberMethod.cs
- Logging.cs
- DetailsViewModeEventArgs.cs
- PagedDataSource.cs
- SoapExtensionStream.cs
- Pens.cs
- SettingsPropertyCollection.cs
- ObjectAssociationEndMapping.cs
- EventTrigger.cs
- UndirectedGraph.cs
- FormsAuthenticationEventArgs.cs
- PropertyEmitterBase.cs
- AssociatedControlConverter.cs
- GridView.cs
- RuleEngine.cs
- DocumentViewerBaseAutomationPeer.cs
- SimpleModelProvider.cs
- StatusStrip.cs
- PointCollection.cs
- RadioButtonList.cs
- VBIdentifierDesigner.xaml.cs
- SoapExtensionStream.cs
- UpdateManifestForBrowserApplication.cs
- OutOfProcStateClientManager.cs
- MobileControlsSection.cs
- FlowLayoutPanel.cs
- NumberFunctions.cs
- VectorCollectionConverter.cs
- DateTimeValueSerializerContext.cs
- TrustLevelCollection.cs
- CodeSubDirectoriesCollection.cs
- TargetParameterCountException.cs
- PageContent.cs
- PerfService.cs
- AdornerLayer.cs
- cache.cs
- DataBoundLiteralControl.cs
- OracleInternalConnection.cs
- HMACSHA256.cs
- RequiredAttributeAttribute.cs
- XmlSchemaElement.cs
- ResourceManager.cs
- storagemappingitemcollection.viewdictionary.cs
- NameValueConfigurationCollection.cs
- MachineSettingsSection.cs
- DecoratedNameAttribute.cs
- LocalizationParserHooks.cs
- OleDbFactory.cs
- ExpressionNormalizer.cs
- ModelTypeConverter.cs
- CacheRequest.cs
- xml.cs
- SoapMessage.cs
- XmlUtf8RawTextWriter.cs
- DrawingDrawingContext.cs
- Package.cs
- DataGridAutoGeneratingColumnEventArgs.cs