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
- PointHitTestParameters.cs
- StopStoryboard.cs
- StylusEditingBehavior.cs
- SqlCommandBuilder.cs
- X509ChainPolicy.cs
- ObjectStorage.cs
- DefaultMemberAttribute.cs
- DataQuery.cs
- ImageMapEventArgs.cs
- OutputCacheSettings.cs
- WebZoneDesigner.cs
- TextFormatterContext.cs
- Rect3D.cs
- ZipIOExtraField.cs
- ZoneButton.cs
- WebBrowserPermission.cs
- ModelPerspective.cs
- ToolBarButtonClickEvent.cs
- CombinedHttpChannel.cs
- ListBoxAutomationPeer.cs
- TypeCollectionPropertyEditor.cs
- SystemUdpStatistics.cs
- SynchronizingStream.cs
- KeysConverter.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- BitmapFrameEncode.cs
- StretchValidation.cs
- RIPEMD160Managed.cs
- SafeNativeMethods.cs
- CqlQuery.cs
- JournalEntry.cs
- MessagePropertyFilter.cs
- AffineTransform3D.cs
- TimelineGroup.cs
- MetadataPropertyAttribute.cs
- ClientUtils.cs
- InputLanguage.cs
- ScrollItemProviderWrapper.cs
- TextTabProperties.cs
- EnumBuilder.cs
- SelectionEditor.cs
- WinInet.cs
- ClientOptions.cs
- MobileControlsSectionHandler.cs
- AuthenticatingEventArgs.cs
- CheckoutException.cs
- BuildDependencySet.cs
- SymmetricKeyWrap.cs
- AssemblyAttributes.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- QilBinary.cs
- OdbcParameter.cs
- BitmapImage.cs
- AsyncOperation.cs
- CallbackHandler.cs
- HttpProfileBase.cs
- ReadOnlyHierarchicalDataSource.cs
- WindowsFormsDesignerOptionService.cs
- RootBrowserWindowAutomationPeer.cs
- ActivationArguments.cs
- WindowsScroll.cs
- XmlEncodedRawTextWriter.cs
- HasRunnableWorkflowEvent.cs
- OptimalBreakSession.cs
- ImageSourceTypeConverter.cs
- ComboBoxAutomationPeer.cs
- ISAPIWorkerRequest.cs
- RelationshipWrapper.cs
- Pkcs7Signer.cs
- IEnumerable.cs
- AttachedPropertyBrowsableAttribute.cs
- CachedPathData.cs
- ActivationWorker.cs
- SequenceNumber.cs
- Vector3DConverter.cs
- FontFamily.cs
- MetricEntry.cs
- PinnedBufferMemoryStream.cs
- FormsAuthenticationEventArgs.cs
- ParameterRetriever.cs
- CustomPopupPlacement.cs
- XmlLinkedNode.cs
- TextParaClient.cs
- SimpleColumnProvider.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- ProjectionCamera.cs
- WorkflowInstance.cs
- HttpWebRequest.cs
- SizeChangedEventArgs.cs
- GlyphsSerializer.cs
- MobileControlsSection.cs
- DetailsViewInsertedEventArgs.cs
- MaterializeFromAtom.cs
- HostProtectionException.cs
- XmlSchemaImport.cs
- DBParameter.cs
- InputDevice.cs
- EdmValidator.cs
- CodeSubDirectory.cs
- OracleDataReader.cs