Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / InvalidEnumArgumentException.cs / 1305376 / 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
- AdapterSwitches.cs
- StorageFunctionMapping.cs
- FixedTextBuilder.cs
- arc.cs
- Certificate.cs
- HandlerWithFactory.cs
- NotSupportedException.cs
- Pen.cs
- DateTimeStorage.cs
- XPathNodeIterator.cs
- CommandManager.cs
- ExpandableObjectConverter.cs
- DataGridViewCellStyleConverter.cs
- XmlSchemaComplexContentRestriction.cs
- ShaperBuffers.cs
- TransformedBitmap.cs
- TabControlEvent.cs
- MexHttpsBindingElement.cs
- XsltFunctions.cs
- ListViewInsertEventArgs.cs
- FrameworkTextComposition.cs
- DefaultValueAttribute.cs
- BitmapCodecInfoInternal.cs
- InitializerFacet.cs
- TextWriterEngine.cs
- OdbcDataReader.cs
- Axis.cs
- DataObjectFieldAttribute.cs
- Point.cs
- Base64Decoder.cs
- CodeDOMProvider.cs
- FileDialogCustomPlace.cs
- HijriCalendar.cs
- DataBoundControl.cs
- BaseHashHelper.cs
- System.Data.OracleClient_BID.cs
- SafeCryptContextHandle.cs
- SQLUtility.cs
- DelegatingTypeDescriptionProvider.cs
- TransformedBitmap.cs
- documentsequencetextcontainer.cs
- Soap.cs
- PermissionSetEnumerator.cs
- PasswordTextNavigator.cs
- OdbcConnectionString.cs
- WorkflowPersistenceService.cs
- Tuple.cs
- COM2ComponentEditor.cs
- XmlDataSourceNodeDescriptor.cs
- FixedSOMFixedBlock.cs
- StringBuilder.cs
- XmlSchemaSimpleContentRestriction.cs
- DataGridViewCellConverter.cs
- Int32KeyFrameCollection.cs
- DataGridViewCellMouseEventArgs.cs
- SecurityTokenSerializer.cs
- PresentationTraceSources.cs
- RsaKeyIdentifierClause.cs
- FactoryGenerator.cs
- StyleHelper.cs
- __Error.cs
- LingerOption.cs
- SharedPersonalizationStateInfo.cs
- SpellCheck.cs
- ControlBindingsConverter.cs
- VScrollBar.cs
- HtmlTableCell.cs
- WebBrowserProgressChangedEventHandler.cs
- ObjectViewEntityCollectionData.cs
- MemberHolder.cs
- ListDictionary.cs
- CollectionChange.cs
- OperandQuery.cs
- RectangleGeometry.cs
- ScriptControlDescriptor.cs
- SchemaEntity.cs
- HttpStreamXmlDictionaryWriter.cs
- ListItemCollection.cs
- AsymmetricSignatureDeformatter.cs
- RightsManagementEncryptedStream.cs
- DataGridViewCellValidatingEventArgs.cs
- SqlCacheDependency.cs
- Helpers.cs
- AsymmetricSignatureDeformatter.cs
- VideoDrawing.cs
- ECDiffieHellmanCngPublicKey.cs
- ContextMenuStripActionList.cs
- XmlSchemas.cs
- SimpleHandlerFactory.cs
- BehaviorEditorPart.cs
- EmptyEnumerator.cs
- ModelToObjectValueConverter.cs
- OracleConnection.cs
- ResourceDefaultValueAttribute.cs
- Int16Storage.cs
- SymbolDocumentGenerator.cs
- Claim.cs
- SecureEnvironment.cs
- CodeTypeParameterCollection.cs
- IssuanceLicense.cs