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
- AddressingVersion.cs
- KeyFrames.cs
- ColumnTypeConverter.cs
- CSharpCodeProvider.cs
- MessageSmuggler.cs
- DbConnectionPoolGroup.cs
- Pens.cs
- SyndicationDeserializer.cs
- MetadataUtilsSmi.cs
- SHA1CryptoServiceProvider.cs
- ApplicationManager.cs
- RepeatButton.cs
- XmlAttribute.cs
- EditorPart.cs
- ResourceProviderFactory.cs
- HealthMonitoringSectionHelper.cs
- TabletDeviceInfo.cs
- ResourceDefaultValueAttribute.cs
- QueryModel.cs
- connectionpool.cs
- AddingNewEventArgs.cs
- SecurityException.cs
- BamlTreeUpdater.cs
- SystemIcmpV6Statistics.cs
- GridView.cs
- SmiConnection.cs
- ResizeGrip.cs
- MouseDevice.cs
- LicenseProviderAttribute.cs
- ObjectSpanRewriter.cs
- DefaultBindingPropertyAttribute.cs
- Imaging.cs
- WindowsRegion.cs
- IRCollection.cs
- DatagridviewDisplayedBandsData.cs
- Cursor.cs
- ModelItemExtensions.cs
- LocalizableAttribute.cs
- WebPartVerbCollection.cs
- WindowsSysHeader.cs
- ClientTarget.cs
- CoreSwitches.cs
- StrongNameKeyPair.cs
- AsyncResult.cs
- ListViewTableRow.cs
- XmlArrayItemAttribute.cs
- EntityViewGenerator.cs
- PreviewPrintController.cs
- TemplateBamlRecordReader.cs
- IsolatedStoragePermission.cs
- MessageHeaderException.cs
- CrossSiteScriptingValidation.cs
- XmlSchemaSubstitutionGroup.cs
- ExplicitDiscriminatorMap.cs
- DragStartedEventArgs.cs
- UnitySerializationHolder.cs
- MissingMemberException.cs
- DynamicMethod.cs
- FilterableAttribute.cs
- BamlBinaryReader.cs
- SelectionItemProviderWrapper.cs
- XmlBinaryReaderSession.cs
- FlowDocumentFormatter.cs
- CommonXSendMessage.cs
- HtmlSelect.cs
- Misc.cs
- Add.cs
- LocatorBase.cs
- SmtpFailedRecipientException.cs
- SpecialFolderEnumConverter.cs
- TimeSpanConverter.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ValidationPropertyAttribute.cs
- MenuEventArgs.cs
- TypeSemantics.cs
- DescendantBaseQuery.cs
- AuthenticationConfig.cs
- DataGridViewHitTestInfo.cs
- CodeMemberProperty.cs
- RoleServiceManager.cs
- WebConfigurationHostFileChange.cs
- HttpWebRequestElement.cs
- WindowsFormsSectionHandler.cs
- FilterQuery.cs
- XmlArrayItemAttributes.cs
- SqlAliasesReferenced.cs
- Helpers.cs
- BlockExpression.cs
- CodeSnippetCompileUnit.cs
- FilteredSchemaElementLookUpTable.cs
- UndoEngine.cs
- TableProviderWrapper.cs
- OracleCommandBuilder.cs
- ProfileSettingsCollection.cs
- DataGridViewLinkCell.cs
- DataServiceOperationContext.cs
- SqlTriggerAttribute.cs
- CopyOfAction.cs
- CodeNamespaceImportCollection.cs
- SliderAutomationPeer.cs