Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / InvalidEnumArgumentException.cs / 1 / InvalidEnumArgumentException.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using Microsoft.Win32; using System; using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [Serializable] public class InvalidEnumArgumentException : ArgumentException { ///The exception that is thrown when using invalid arguments that are enumerators. ////// public InvalidEnumArgumentException() : this(null) { } ///Initializes a new instance of the ///class without a message. /// public InvalidEnumArgumentException(string message) : base(message) { } ///Initializes a new instance of the ///class with /// the specified message. /// Initializes a new instance of the Exception class with a specified error message and a /// reference to the inner exception that is the cause of this exception. /// FxCop CA1032: Multiple constructors are required to correctly implement a custom exception. /// public InvalidEnumArgumentException( string message, Exception innerException ) : base(message, innerException) { } ////// public InvalidEnumArgumentException(string argumentName, int invalidValue, Type enumClass) : base(SR.GetString(SR.InvalidEnumArgument, argumentName, invalidValue.ToString(CultureInfo.CurrentCulture), enumClass.Name), argumentName) { } ///Initializes a new instance of the ///class with a /// message generated from the argument, invalid value, and enumeration /// class. /// Need this constructor since Exception implements ISerializable. We don't have any fields, /// so just forward this to base. /// protected InvalidEnumArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DelegateBodyWriter.cs
- Attributes.cs
- QilVisitor.cs
- AcceleratedTokenProvider.cs
- LocatorPartList.cs
- NamespaceDecl.cs
- TailCallAnalyzer.cs
- GlyphTypeface.cs
- NumberAction.cs
- ConfigurationManagerHelperFactory.cs
- CommonObjectSecurity.cs
- SpellerHighlightLayer.cs
- ToolStripPanelSelectionBehavior.cs
- SecurityAlgorithmSuite.cs
- MemoryStream.cs
- TempEnvironment.cs
- FileBasedResourceGroveler.cs
- DiagnosticStrings.cs
- ValidationErrorCollection.cs
- FaultHandlingFilter.cs
- MessageAction.cs
- TabPanel.cs
- RenderDataDrawingContext.cs
- KnownIds.cs
- ReferencedType.cs
- ServiceProviders.cs
- GeometryDrawing.cs
- BridgeDataRecord.cs
- Parser.cs
- SimpleBitVector32.cs
- ApplyImportsAction.cs
- DefaultSection.cs
- _StreamFramer.cs
- MatrixIndependentAnimationStorage.cs
- BitmapEffectInput.cs
- TextLine.cs
- XsdValidatingReader.cs
- AnchorEditor.cs
- ChangeProcessor.cs
- RegexCode.cs
- WebPartUserCapability.cs
- LabelAutomationPeer.cs
- Queue.cs
- ThreadInterruptedException.cs
- RefreshEventArgs.cs
- DataGridColumn.cs
- WFItemsToSpacerVisibility.cs
- MatrixCamera.cs
- TypeUsageBuilder.cs
- MLangCodePageEncoding.cs
- EmptyCollection.cs
- SystemUnicastIPAddressInformation.cs
- DesignerLoader.cs
- Bidi.cs
- ClientConfigurationHost.cs
- TextSelectionProcessor.cs
- HtmlMeta.cs
- Lock.cs
- RtfNavigator.cs
- DataGridViewAccessibleObject.cs
- ConfigurationSectionGroupCollection.cs
- SoapAttributes.cs
- XsdCachingReader.cs
- Win32.cs
- StrokeNodeOperations.cs
- SqlTypesSchemaImporter.cs
- SafeLibraryHandle.cs
- ThreadStaticAttribute.cs
- BorderGapMaskConverter.cs
- MembershipSection.cs
- BuildManagerHost.cs
- EntityDataSourceDataSelection.cs
- SqlDataSourceEnumerator.cs
- ContractAdapter.cs
- DataRelationCollection.cs
- ReachIDocumentPaginatorSerializerAsync.cs
- SqlTrackingService.cs
- SafeRegistryHandle.cs
- SqlIdentifier.cs
- SqlDependencyUtils.cs
- EncryptedType.cs
- ObjectDataSourceMethodEventArgs.cs
- InfoCardUIAgent.cs
- PipelineModuleStepContainer.cs
- AssemblyResolver.cs
- PeerTransportListenAddressConverter.cs
- KerberosSecurityTokenAuthenticator.cs
- FormsAuthenticationCredentials.cs
- EntityWithKeyStrategy.cs
- DropShadowEffect.cs
- EventDescriptorCollection.cs
- SpellerHighlightLayer.cs
- BaseAsyncResult.cs
- Socket.cs
- ReadOnlyDictionary.cs
- COM2PropertyDescriptor.cs
- Cell.cs
- CompilationSection.cs
- PaintEvent.cs
- NoneExcludedImageIndexConverter.cs