Code:
/ FX-1434 / FX-1434 / 1.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
- ellipse.cs
- TableCell.cs
- TableChangeProcessor.cs
- SafeHandle.cs
- RelationshipDetailsRow.cs
- DataObject.cs
- Rfc2898DeriveBytes.cs
- QueryCacheManager.cs
- AssemblyInfo.cs
- FontSourceCollection.cs
- StateItem.cs
- InternalBufferOverflowException.cs
- Parameter.cs
- FrameSecurityDescriptor.cs
- TypeExtensionConverter.cs
- ControlParser.cs
- AspProxy.cs
- SortQuery.cs
- ButtonStandardAdapter.cs
- TextBox.cs
- SQlBooleanStorage.cs
- SystemGatewayIPAddressInformation.cs
- EdmProperty.cs
- VersionConverter.cs
- EntryWrittenEventArgs.cs
- ServiceNameCollection.cs
- MatcherBuilder.cs
- ReadOnlyDictionary.cs
- DataList.cs
- CounterSampleCalculator.cs
- ButtonBaseAdapter.cs
- ThousandthOfEmRealPoints.cs
- WindowsScrollBarBits.cs
- CheckBoxList.cs
- X509ThumbprintKeyIdentifierClause.cs
- SimplePropertyEntry.cs
- RefType.cs
- DragDropManager.cs
- DefaultSerializationProviderAttribute.cs
- ExceptionUtil.cs
- ContentPlaceHolder.cs
- Gdiplus.cs
- GridViewDeletedEventArgs.cs
- TextViewElement.cs
- DataError.cs
- HtmlElementEventArgs.cs
- DropShadowBitmapEffect.cs
- CodeComment.cs
- WorkflowServiceBehavior.cs
- DesignTimeValidationFeature.cs
- CodeParameterDeclarationExpression.cs
- PenThreadWorker.cs
- EditorAttribute.cs
- SpeechRecognitionEngine.cs
- TextTreeRootTextBlock.cs
- WindowsListViewGroupSubsetLink.cs
- SafeThreadHandle.cs
- TransactionTable.cs
- ListView.cs
- TracedNativeMethods.cs
- RequestCachePolicy.cs
- DataBindEngine.cs
- CustomAttributeSerializer.cs
- ProfileGroupSettingsCollection.cs
- TreeNodeCollection.cs
- NeedSkipTokenVisitor.cs
- ApplicationSettingsBase.cs
- NetworkInformationPermission.cs
- ServiceDebugBehavior.cs
- ConditionChanges.cs
- PropagatorResult.cs
- Int32Rect.cs
- ColumnCollectionEditor.cs
- PrivilegedConfigurationManager.cs
- ArraySet.cs
- NetTcpSection.cs
- BypassElement.cs
- FakeModelPropertyImpl.cs
- NavigatingCancelEventArgs.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- EntityStoreSchemaGenerator.cs
- ErrorHandler.cs
- HttpResponseHeader.cs
- TextCompositionManager.cs
- WindowsGraphics.cs
- AudioSignalProblemOccurredEventArgs.cs
- LicenseException.cs
- ControlBuilder.cs
- ConfigXmlText.cs
- ConnectionConsumerAttribute.cs
- FieldMetadata.cs
- Splitter.cs
- BlockExpression.cs
- RouteItem.cs
- GlobalItem.cs
- BamlResourceContent.cs
- Rotation3DKeyFrameCollection.cs
- XmlToDatasetMap.cs
- CustomAttribute.cs
- ItemsChangedEventArgs.cs