Code:
/ FX-1434 / FX-1434 / 1.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
- WindowsPen.cs
- CookieProtection.cs
- ObjectFullSpanRewriter.cs
- HandlerFactoryWrapper.cs
- Attributes.cs
- LeftCellWrapper.cs
- IntegrationExceptionEventArgs.cs
- CollectionChangedEventManager.cs
- MappingModelBuildProvider.cs
- WebPageTraceListener.cs
- DesignerRegionMouseEventArgs.cs
- FontDriver.cs
- TextEndOfLine.cs
- SelectionProcessor.cs
- Control.cs
- QueryOutputWriter.cs
- WorkflowWebHostingModule.cs
- CatalogPartChrome.cs
- InfocardExtendedInformationEntry.cs
- CollectionViewGroupRoot.cs
- CollectionContainer.cs
- UnsafeNativeMethods.cs
- Track.cs
- Figure.cs
- SafeArrayRankMismatchException.cs
- ForeignConstraint.cs
- CodeStatement.cs
- SoapEnumAttribute.cs
- Point3D.cs
- XmlSchemaSimpleTypeList.cs
- RectIndependentAnimationStorage.cs
- TextPointerBase.cs
- SchemaImporterExtensionElement.cs
- X509RawDataKeyIdentifierClause.cs
- ISSmlParser.cs
- Unit.cs
- PaintEvent.cs
- ArrangedElementCollection.cs
- NavigatorInput.cs
- SizeConverter.cs
- _AuthenticationState.cs
- DataGridViewCellCancelEventArgs.cs
- CodeMemberProperty.cs
- CultureInfo.cs
- Win32KeyboardDevice.cs
- CallbackValidatorAttribute.cs
- IdleTimeoutMonitor.cs
- QueryAccessibilityHelpEvent.cs
- CodeDirectoryCompiler.cs
- TemplatedAdorner.cs
- VisualStyleTypesAndProperties.cs
- PropertyEmitterBase.cs
- ReverseInheritProperty.cs
- FontFaceLayoutInfo.cs
- GridSplitter.cs
- PrintDocument.cs
- FontCollection.cs
- NumericExpr.cs
- AsyncPostBackErrorEventArgs.cs
- StaticDataManager.cs
- COAUTHINFO.cs
- OutputCacheProfile.cs
- TextPointerBase.cs
- DocumentViewerBaseAutomationPeer.cs
- ZipFileInfo.cs
- ObjectListCommandEventArgs.cs
- ConditionCollection.cs
- Stylesheet.cs
- RijndaelCryptoServiceProvider.cs
- LogicalExpressionEditor.cs
- EraserBehavior.cs
- LinearKeyFrames.cs
- XPathSingletonIterator.cs
- OdbcError.cs
- AssemblyCache.cs
- ControlBindingsCollection.cs
- ByteStreamBufferedMessageData.cs
- WebPartExportVerb.cs
- ServiceHostingEnvironmentSection.cs
- OpenFileDialog.cs
- GuidelineSet.cs
- SamlEvidence.cs
- SQLString.cs
- IsolatedStorageFileStream.cs
- MaskedTextBoxTextEditorDropDown.cs
- MultilineStringConverter.cs
- CodeSpit.cs
- RuleSettingsCollection.cs
- XamlTypeMapper.cs
- SystemResourceKey.cs
- TableLayoutCellPaintEventArgs.cs
- AddingNewEventArgs.cs
- HttpApplication.cs
- SqlTransaction.cs
- DataGridViewColumnStateChangedEventArgs.cs
- Root.cs
- ExpressionPrinter.cs
- KeyValueInternalCollection.cs
- SafeLocalAllocation.cs
- Light.cs