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
- ConfigurationValidatorAttribute.cs
- BamlTreeMap.cs
- BaseParser.cs
- ProjectedSlot.cs
- SortDescriptionCollection.cs
- TextOptionsInternal.cs
- DataView.cs
- RequestResizeEvent.cs
- ActivityUtilities.cs
- RemotingConfiguration.cs
- CursorConverter.cs
- XmlDictionaryReader.cs
- HtmlElementEventArgs.cs
- CompiledRegexRunner.cs
- PersianCalendar.cs
- WebConfigurationHost.cs
- XmlAutoDetectWriter.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TextEffectResolver.cs
- HtmlTableRow.cs
- TreeIterator.cs
- HtmlControl.cs
- _AutoWebProxyScriptWrapper.cs
- Debug.cs
- SimpleLine.cs
- DataSourceProvider.cs
- ImpersonateTokenRef.cs
- AutomationPeer.cs
- SystemColorTracker.cs
- DataGridViewTopLeftHeaderCell.cs
- SafeReversePInvokeHandle.cs
- Debug.cs
- XmlSchemaSimpleType.cs
- ControlIdConverter.cs
- Soap12ProtocolImporter.cs
- DataGridViewCheckBoxCell.cs
- FrugalList.cs
- FixedFindEngine.cs
- QilReplaceVisitor.cs
- EmptyCollection.cs
- GrammarBuilderPhrase.cs
- ClientScriptManager.cs
- ActivityWithResultWrapper.cs
- Win32PrintDialog.cs
- DynamicDataResources.Designer.cs
- Enum.cs
- HtmlElementCollection.cs
- CodeTypeReference.cs
- Memoizer.cs
- SelectionUIService.cs
- ProgressBarAutomationPeer.cs
- XmlQualifiedName.cs
- XmlSchemaAttributeGroupRef.cs
- DataListItem.cs
- UIHelper.cs
- ProviderSettings.cs
- MethodBody.cs
- IndentTextWriter.cs
- ProxyHelper.cs
- BindStream.cs
- Process.cs
- MonitorWrapper.cs
- SecurityTokenParametersEnumerable.cs
- Int16Storage.cs
- ArraySubsetEnumerator.cs
- DesignerTransaction.cs
- GridViewUpdateEventArgs.cs
- AssemblyBuilderData.cs
- OleCmdHelper.cs
- xml.cs
- MenuCommands.cs
- InternalCompensate.cs
- InvalidCommandTreeException.cs
- Sql8ExpressionRewriter.cs
- DBAsyncResult.cs
- XsdCachingReader.cs
- CompilerCollection.cs
- ConfigXmlWhitespace.cs
- WebCodeGenerator.cs
- WebPartConnectionCollection.cs
- TextEditorMouse.cs
- DataGridViewCellValueEventArgs.cs
- MessageFilterTable.cs
- Funcletizer.cs
- PolicyException.cs
- ScopedKnownTypes.cs
- SchemaTableColumn.cs
- CodeCommentStatementCollection.cs
- ReflectionServiceProvider.cs
- SamlEvidence.cs
- FamilyTypeface.cs
- WebPartConnection.cs
- ToolStripDropDownMenu.cs
- LineBreak.cs
- GraphicsPathIterator.cs
- CatchBlock.cs
- VisualStyleRenderer.cs
- DataGridViewUtilities.cs
- _AcceptOverlappedAsyncResult.cs
- ToolBar.cs