Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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) { } } } // 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
- NoClickablePointException.cs
- PeerNameRecord.cs
- Deflater.cs
- RegularExpressionValidator.cs
- ObjectViewFactory.cs
- TrackingDataItemValue.cs
- InteropDesigner.xaml.cs
- SHA384Cng.cs
- CustomCategoryAttribute.cs
- TemplateBindingExpression.cs
- ListItemsCollectionEditor.cs
- WindowsFormsHost.cs
- Camera.cs
- CoTaskMemHandle.cs
- Window.cs
- TableMethodGenerator.cs
- ToolBarButtonClickEvent.cs
- XmlSerializerNamespaces.cs
- TextServicesHost.cs
- FileReader.cs
- linebase.cs
- NumberEdit.cs
- WebEvents.cs
- LocatorGroup.cs
- ConnectionConsumerAttribute.cs
- Misc.cs
- NotFiniteNumberException.cs
- X509ChainPolicy.cs
- ItemCheckedEvent.cs
- ImageMetadata.cs
- MaskedTextProvider.cs
- OdbcConnectionFactory.cs
- BulletedList.cs
- DataFieldConverter.cs
- AsyncCompletedEventArgs.cs
- LocalFileSettingsProvider.cs
- ParserOptions.cs
- ContentOnlyMessage.cs
- ExpandableObjectConverter.cs
- TextParagraphProperties.cs
- SqlInternalConnectionSmi.cs
- ProcessHostFactoryHelper.cs
- KeyBinding.cs
- SinglePhaseEnlistment.cs
- AppDomain.cs
- KernelTypeValidation.cs
- Int16Animation.cs
- MediaTimeline.cs
- DataKeyArray.cs
- OperatingSystem.cs
- XmlDataSource.cs
- UIElement3D.cs
- MailFileEditor.cs
- TablePattern.cs
- SoapServerMethod.cs
- ListItemCollection.cs
- TextCompositionManager.cs
- ConnectionPointGlyph.cs
- HtmlEmptyTagControlBuilder.cs
- SemanticTag.cs
- MenuItem.cs
- DataServiceRequestException.cs
- HttpVersion.cs
- ModifiableIteratorCollection.cs
- LogicalMethodInfo.cs
- ValueUtilsSmi.cs
- RemotingConfigParser.cs
- TokenizerHelper.cs
- ViewStateModeByIdAttribute.cs
- DesignerSerializerAttribute.cs
- CharacterHit.cs
- CounterSampleCalculator.cs
- CollectionEditorDialog.cs
- TcpChannelListener.cs
- ErrorWebPart.cs
- XPathNodeList.cs
- TrustManagerPromptUI.cs
- OLEDB_Enum.cs
- Verify.cs
- HeaderElement.cs
- Typeface.cs
- remotingproxy.cs
- PreparingEnlistment.cs
- MeasureItemEvent.cs
- SQLBinary.cs
- PartBasedPackageProperties.cs
- PauseStoryboard.cs
- ToolStripScrollButton.cs
- XmlSchemaSimpleContentRestriction.cs
- RecommendedAsConfigurableAttribute.cs
- FileChangesMonitor.cs
- QueryStringParameter.cs
- XmlAttributeProperties.cs
- Rectangle.cs
- ContentElementCollection.cs
- MouseGesture.cs
- DependencyProperty.cs
- QuerySubExprEliminator.cs
- LayoutTableCell.cs
- Sequence.cs