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
- JournalEntryStack.cs
- EventLogPermissionEntryCollection.cs
- ProfessionalColors.cs
- TypefaceMap.cs
- DataGridViewRowsAddedEventArgs.cs
- DesignSurfaceManager.cs
- BitmapInitialize.cs
- DataGridCellsPanel.cs
- ScrollViewerAutomationPeer.cs
- SettingsAttributes.cs
- VisualBrush.cs
- AspNetHostingPermission.cs
- LocalFileSettingsProvider.cs
- PerformanceCounterPermission.cs
- DrawingContextWalker.cs
- SafeCryptoKeyHandle.cs
- Shared.cs
- SubtreeProcessor.cs
- SecurityHeader.cs
- RegisteredScript.cs
- Assert.cs
- ContentValidator.cs
- PartialList.cs
- TextBlockAutomationPeer.cs
- PingOptions.cs
- ExpressionPrefixAttribute.cs
- LinqMaximalSubtreeNominator.cs
- TableRowCollection.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- LinearKeyFrames.cs
- RIPEMD160Managed.cs
- DrawingAttributesDefaultValueFactory.cs
- CookieProtection.cs
- ScalarConstant.cs
- SecurityRuntime.cs
- WriteTimeStream.cs
- SortedList.cs
- XmlEntityReference.cs
- WebServiceData.cs
- MenuStrip.cs
- COM2ExtendedTypeConverter.cs
- Number.cs
- GridErrorDlg.cs
- _NestedMultipleAsyncResult.cs
- VectorKeyFrameCollection.cs
- PasswordTextNavigator.cs
- ThreadExceptionEvent.cs
- _LocalDataStore.cs
- AgileSafeNativeMemoryHandle.cs
- ADMembershipProvider.cs
- MouseGesture.cs
- PropertyPushdownHelper.cs
- BitmapEffectDrawingContextWalker.cs
- MenuItemCollection.cs
- Options.cs
- Stylesheet.cs
- PropertyEntry.cs
- Rotation3D.cs
- AnonymousIdentificationSection.cs
- Matrix3D.cs
- XsdBuildProvider.cs
- ReferenceEqualityComparer.cs
- IdnMapping.cs
- DiscoveryDocument.cs
- CharacterMetricsDictionary.cs
- EndPoint.cs
- TextUtf8RawTextWriter.cs
- UserControlParser.cs
- StylusPointPropertyUnit.cs
- MemoryRecordBuffer.cs
- HttpContext.cs
- PropertyDescriptor.cs
- InstanceData.cs
- InputMethodStateChangeEventArgs.cs
- ExpressionBindings.cs
- ProxyWebPartManager.cs
- XmlDataProvider.cs
- ContextQuery.cs
- NamedPipeChannelFactory.cs
- WindowsBrush.cs
- ElementAction.cs
- EnterpriseServicesHelper.cs
- Bits.cs
- RadioButtonRenderer.cs
- DataObjectCopyingEventArgs.cs
- WebPermission.cs
- StringAttributeCollection.cs
- IsolationInterop.cs
- MD5CryptoServiceProvider.cs
- GatewayDefinition.cs
- ReliableSession.cs
- Trace.cs
- HotSpotCollection.cs
- XmlIgnoreAttribute.cs
- XsltException.cs
- SqlConnectionFactory.cs
- XmlChildNodes.cs
- MergeFilterQuery.cs
- SystemNetHelpers.cs
- ToolStripDesigner.cs