Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- xmlsaver.cs
- DataColumnCollection.cs
- MexTcpBindingElement.cs
- PersonalizableAttribute.cs
- contentDescriptor.cs
- WindowsRichEdit.cs
- ConfigurationManagerHelperFactory.cs
- Size3D.cs
- UriTemplateHelpers.cs
- Bind.cs
- Int32AnimationUsingKeyFrames.cs
- BuildProviderInstallComponent.cs
- LinkClickEvent.cs
- DataSourceSelectArguments.cs
- BigIntegerStorage.cs
- MetadataCollection.cs
- ResourceDisplayNameAttribute.cs
- DataReaderContainer.cs
- CompositeDesignerAccessibleObject.cs
- InternalResources.cs
- PathSegment.cs
- UnauthorizedAccessException.cs
- DbParameterHelper.cs
- XamlUtilities.cs
- CorruptingExceptionCommon.cs
- DetailsViewInsertEventArgs.cs
- BindingCompleteEventArgs.cs
- MenuItemStyleCollection.cs
- DateTimeOffsetStorage.cs
- ContentTextAutomationPeer.cs
- WarningException.cs
- RequestChannel.cs
- cryptoapiTransform.cs
- CalendarModeChangedEventArgs.cs
- AnonymousIdentificationSection.cs
- BindingEntityInfo.cs
- SafeArrayRankMismatchException.cs
- ParentUndoUnit.cs
- ThemeableAttribute.cs
- PackagingUtilities.cs
- SafeRegistryHandle.cs
- DataGridViewLinkCell.cs
- GC.cs
- NamedPipeActivation.cs
- SoapDocumentMethodAttribute.cs
- Membership.cs
- UInt64Storage.cs
- ToolStripItemImageRenderEventArgs.cs
- FactoryId.cs
- TreeView.cs
- SoapWriter.cs
- PropertyOrder.cs
- XdrBuilder.cs
- AttachedProperty.cs
- StorageEndPropertyMapping.cs
- TemplateControlBuildProvider.cs
- ArgumentDirectionHelper.cs
- XsltLibrary.cs
- Int64.cs
- LayoutInformation.cs
- XmlILModule.cs
- TableLayoutStyle.cs
- DataException.cs
- MetadataException.cs
- TableLayoutSettings.cs
- TableCellCollection.cs
- PathParser.cs
- StringExpressionSet.cs
- SafeArrayTypeMismatchException.cs
- CompilationUnit.cs
- XPathBinder.cs
- DeferredSelectedIndexReference.cs
- OleDbSchemaGuid.cs
- FixedHighlight.cs
- PkcsUtils.cs
- BackgroundFormatInfo.cs
- StatusBarAutomationPeer.cs
- Int16Animation.cs
- CheckBoxAutomationPeer.cs
- SystemUnicastIPAddressInformation.cs
- SqlFlattener.cs
- CreateUserErrorEventArgs.cs
- ObjectDataSourceMethodEventArgs.cs
- FirstMatchCodeGroup.cs
- filewebrequest.cs
- UserNameSecurityTokenAuthenticator.cs
- Stack.cs
- TrustSection.cs
- ImmutablePropertyDescriptorGridEntry.cs
- WebPartEventArgs.cs
- ZipPackage.cs
- SqlCommandBuilder.cs
- WebControl.cs
- PassportPrincipal.cs
- LinkedList.cs
- InstalledFontCollection.cs
- AbsoluteQuery.cs
- Clipboard.cs
- NullReferenceException.cs
- MailSettingsSection.cs