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
- CompilationUnit.cs
- ConsoleKeyInfo.cs
- BooleanAnimationBase.cs
- DbReferenceCollection.cs
- VisualTarget.cs
- DbReferenceCollection.cs
- CacheSection.cs
- StaticTextPointer.cs
- CroppedBitmap.cs
- DataServiceResponse.cs
- linebase.cs
- Relationship.cs
- DragCompletedEventArgs.cs
- WebServiceClientProxyGenerator.cs
- ApplyTemplatesAction.cs
- ListChangedEventArgs.cs
- followingsibling.cs
- Graph.cs
- Ipv6Element.cs
- MenuBase.cs
- FixedFlowMap.cs
- KeyFrames.cs
- DesignerGenericWebPart.cs
- Maps.cs
- OptimisticConcurrencyException.cs
- FillRuleValidation.cs
- SizeChangedInfo.cs
- FreezableCollection.cs
- MenuItem.cs
- DataGridItemEventArgs.cs
- AuthenticationModuleElementCollection.cs
- OutputCacheProfileCollection.cs
- ValidationException.cs
- SQLDouble.cs
- FaultPropagationRecord.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- StateRuntime.cs
- TreeNodeBinding.cs
- EventSinkHelperWriter.cs
- DataSourceCacheDurationConverter.cs
- FrameworkContentElement.cs
- DocumentAutomationPeer.cs
- ControlCachePolicy.cs
- AppDomainProtocolHandler.cs
- CancelEventArgs.cs
- XhtmlTextWriter.cs
- MsmqIntegrationOutputChannel.cs
- RemotingException.cs
- HtmlMeta.cs
- ValueChangedEventManager.cs
- InkPresenter.cs
- XmlSchemaAnnotation.cs
- SerializationFieldInfo.cs
- RequestCacheManager.cs
- bidPrivateBase.cs
- Convert.cs
- SqlTypeConverter.cs
- ContextMenuAutomationPeer.cs
- AutoGeneratedField.cs
- GenericWebPart.cs
- IFormattable.cs
- BaseParaClient.cs
- FormsAuthenticationModule.cs
- EarlyBoundInfo.cs
- ParallelActivityDesigner.cs
- WebPartEventArgs.cs
- PolicyException.cs
- Translator.cs
- RelatedPropertyManager.cs
- WbmpConverter.cs
- PathFigureCollectionConverter.cs
- ColorTransform.cs
- DmlSqlGenerator.cs
- DataGridViewTopRowAccessibleObject.cs
- BoolLiteral.cs
- ControlPaint.cs
- DropDownHolder.cs
- SafeNativeMethods.cs
- SortQuery.cs
- base64Transforms.cs
- HwndStylusInputProvider.cs
- SQLUtility.cs
- PngBitmapEncoder.cs
- FlatButtonAppearance.cs
- XmlAttributeProperties.cs
- DescendantBaseQuery.cs
- XmlCharType.cs
- ComponentResourceKeyConverter.cs
- Canonicalizers.cs
- DefaultAssemblyResolver.cs
- PropertyEmitter.cs
- TextTreeTextBlock.cs
- SecurityKeyIdentifierClause.cs
- HtmlInputCheckBox.cs
- VoiceSynthesis.cs
- InitializationEventAttribute.cs
- Misc.cs
- followingsibling.cs
- RootCodeDomSerializer.cs
- PanelDesigner.cs