Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DependencyPropertyValueSerializer.cs
- ModulesEntry.cs
- UnsafeNativeMethodsMilCoreApi.cs
- DrawListViewSubItemEventArgs.cs
- OracleString.cs
- KeyGestureValueSerializer.cs
- DataGridViewRowsAddedEventArgs.cs
- DesignTimeXamlWriter.cs
- ScriptBehaviorDescriptor.cs
- DataGridViewCheckBoxColumn.cs
- MethodCallConverter.cs
- ChangeConflicts.cs
- UrlMapping.cs
- RoleExceptions.cs
- Animatable.cs
- EventHandlersStore.cs
- SizeF.cs
- DesignerLabelAdapter.cs
- FlowLayoutPanel.cs
- Polygon.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- DataViewSettingCollection.cs
- TransformConverter.cs
- MenuItemCollection.cs
- ChangeNode.cs
- filewebresponse.cs
- KeySpline.cs
- GradientBrush.cs
- AncestorChangedEventArgs.cs
- UpdateTracker.cs
- ObjectCacheHost.cs
- GridLengthConverter.cs
- DoubleLinkListEnumerator.cs
- InvocationExpression.cs
- ExceptionUtil.cs
- BoundPropertyEntry.cs
- ExceptionHandlers.cs
- ListBoxItemAutomationPeer.cs
- XmlAttributes.cs
- StructureChangedEventArgs.cs
- Vars.cs
- OledbConnectionStringbuilder.cs
- TableDetailsCollection.cs
- CommandField.cs
- dbenumerator.cs
- SiteMembershipCondition.cs
- WindowsStartMenu.cs
- DefaultSection.cs
- AutoGeneratedFieldProperties.cs
- ValueUnavailableException.cs
- UriParserTemplates.cs
- AdjustableArrowCap.cs
- QueryContinueDragEvent.cs
- DispatchWrapper.cs
- ComponentGuaranteesAttribute.cs
- PrePrepareMethodAttribute.cs
- RealProxy.cs
- XmlMapping.cs
- HandledMouseEvent.cs
- WebPartDescriptionCollection.cs
- SiteMapPath.cs
- ButtonBase.cs
- BooleanFunctions.cs
- TransformGroup.cs
- ImageField.cs
- storepermission.cs
- HtmlToClrEventProxy.cs
- CharacterString.cs
- SimpleBitVector32.cs
- InputMethod.cs
- InlineObject.cs
- ConfigXmlCDataSection.cs
- StatusBarDrawItemEvent.cs
- SiteMapPath.cs
- SoapTypeAttribute.cs
- XPathSingletonIterator.cs
- DispatcherOperation.cs
- AccessorTable.cs
- CollectionViewGroupRoot.cs
- BuildResultCache.cs
- TemplatedControlDesigner.cs
- DbProviderFactories.cs
- SyndicationDeserializer.cs
- XPathScanner.cs
- TypeName.cs
- WebControlAdapter.cs
- ConfigurationPropertyAttribute.cs
- Clipboard.cs
- DataGridItemCollection.cs
- BatchStream.cs
- Rectangle.cs
- CompositionAdorner.cs
- RepeaterItem.cs
- UnionExpr.cs
- DaylightTime.cs
- Configuration.cs
- RedistVersionInfo.cs
- Point.cs
- PointIndependentAnimationStorage.cs
- NavigationPropertySingletonExpression.cs