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
- WebPartHelpVerb.cs
- DiscoveryExceptionDictionary.cs
- AdornerHitTestResult.cs
- SqlParameter.cs
- IApplicationTrustManager.cs
- EventLogException.cs
- ProgressBar.cs
- TypeLoadException.cs
- SeekableMessageNavigator.cs
- StatusBarAutomationPeer.cs
- DecoderNLS.cs
- FieldDescriptor.cs
- XmlReaderSettings.cs
- EastAsianLunisolarCalendar.cs
- FixedSOMTableCell.cs
- CqlWriter.cs
- Privilege.cs
- AdapterUtil.cs
- BooleanStorage.cs
- Quaternion.cs
- FlagsAttribute.cs
- SoapAttributes.cs
- Stream.cs
- DataGridViewCellStyle.cs
- DrawingAttributesDefaultValueFactory.cs
- ConcurrentQueue.cs
- ApplicationServiceHelper.cs
- ResourceDescriptionAttribute.cs
- CodePrimitiveExpression.cs
- IdleTimeoutMonitor.cs
- WCFModelStrings.Designer.cs
- Int64AnimationUsingKeyFrames.cs
- Delegate.cs
- SecurityVersion.cs
- ListView.cs
- InvokeWebServiceDesigner.cs
- MarkupProperty.cs
- ClientSettingsProvider.cs
- InkCanvasSelection.cs
- SqlDataSourceEnumerator.cs
- HelpProvider.cs
- FlowDocument.cs
- HtmlContainerControl.cs
- Operator.cs
- FormDocumentDesigner.cs
- CodeAttributeDeclaration.cs
- NavigationPropertyAccessor.cs
- KnownBoxes.cs
- LinqDataSourceDisposeEventArgs.cs
- PaginationProgressEventArgs.cs
- SpeakProgressEventArgs.cs
- TextViewBase.cs
- HtmlTableCell.cs
- PrintPageEvent.cs
- XslAst.cs
- TreeViewHitTestInfo.cs
- EventWaitHandleSecurity.cs
- EncoderParameter.cs
- FontCacheUtil.cs
- TimeSpanSecondsConverter.cs
- ChangeNode.cs
- XmlHelper.cs
- Image.cs
- BuiltInExpr.cs
- DataGridViewRowHeaderCell.cs
- CompressStream.cs
- TrackingStringDictionary.cs
- SqlCommand.cs
- DesignerTransactionCloseEvent.cs
- FormsAuthenticationUserCollection.cs
- DataSourceDesigner.cs
- String.cs
- DocumentSequence.cs
- Expander.cs
- Dictionary.cs
- XmlSchemaDocumentation.cs
- EncryptedReference.cs
- regiisutil.cs
- ToolboxItemFilterAttribute.cs
- Scene3D.cs
- SqlHelper.cs
- WebPartEditorApplyVerb.cs
- CompressedStack.cs
- PropertyGroupDescription.cs
- Rfc2898DeriveBytes.cs
- ToolStripSeparatorRenderEventArgs.cs
- XslAstAnalyzer.cs
- X509ChainElement.cs
- Logging.cs
- StrokeCollectionDefaultValueFactory.cs
- TemplateControlBuildProvider.cs
- Publisher.cs
- ToolStripItemEventArgs.cs
- DbConnectionPoolIdentity.cs
- FontStretchConverter.cs
- ApplicationDirectory.cs
- Brush.cs
- DetailsViewPageEventArgs.cs
- MarshalByRefObject.cs
- XmlUtil.cs