Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- XmlSubtreeReader.cs
- GroupItemAutomationPeer.cs
- DrawItemEvent.cs
- AbstractDataSvcMapFileLoader.cs
- Enum.cs
- SessionPageStatePersister.cs
- AsymmetricAlgorithm.cs
- ConnectionPoolManager.cs
- SectionInformation.cs
- ProfileBuildProvider.cs
- LocalIdCollection.cs
- xml.cs
- Token.cs
- AsymmetricSignatureDeformatter.cs
- TransformProviderWrapper.cs
- JavaScriptObjectDeserializer.cs
- SpecialTypeDataContract.cs
- SplineKeyFrames.cs
- QuaternionConverter.cs
- DataBindingList.cs
- DataRowExtensions.cs
- BidOverLoads.cs
- XmlSchemaSimpleTypeUnion.cs
- CharacterBuffer.cs
- smtpconnection.cs
- DefaultPropertyAttribute.cs
- ThrowHelper.cs
- PropertyPathConverter.cs
- XmlSchemaParticle.cs
- ConfigDefinitionUpdates.cs
- DataAdapter.cs
- DateTimeStorage.cs
- CompilationUtil.cs
- WinEventTracker.cs
- FontInfo.cs
- unsafenativemethodstextservices.cs
- ToolStripDropDownItem.cs
- TableChangeProcessor.cs
- SqlDataSourceTableQuery.cs
- D3DImage.cs
- Util.cs
- TableCell.cs
- ArrayExtension.cs
- GridViewHeaderRowPresenter.cs
- XhtmlConformanceSection.cs
- CallTemplateAction.cs
- EntityDataSourceQueryBuilder.cs
- Missing.cs
- Expression.DebuggerProxy.cs
- AtomServiceDocumentSerializer.cs
- BreakRecordTable.cs
- ResourcePermissionBaseEntry.cs
- EventWaitHandle.cs
- Span.cs
- LongTypeConverter.cs
- XmlArrayItemAttribute.cs
- DataRowComparer.cs
- CollectionChangedEventManager.cs
- TextPenaltyModule.cs
- HtmlTableCell.cs
- LongMinMaxAggregationOperator.cs
- FixedSOMFixedBlock.cs
- CodeAccessSecurityEngine.cs
- DataListItemCollection.cs
- ReceiveMessageContent.cs
- LinkGrep.cs
- MimeFormReflector.cs
- XLinq.cs
- DataControlImageButton.cs
- ParentUndoUnit.cs
- TextClipboardData.cs
- ReferenceService.cs
- BindingContext.cs
- CollectionDataContract.cs
- X509SecurityTokenProvider.cs
- SqlNodeAnnotation.cs
- HttpResponseInternalWrapper.cs
- ParameterBuilder.cs
- IUnknownConstantAttribute.cs
- XmlAttributes.cs
- XPathNode.cs
- TriggerActionCollection.cs
- FixedDocumentSequencePaginator.cs
- GPStream.cs
- ConsoleTraceListener.cs
- MetadataFile.cs
- WbemException.cs
- EventRoute.cs
- CompleteWizardStep.cs
- ObjectSet.cs
- TabletDevice.cs
- StructuredType.cs
- EpmSyndicationContentSerializer.cs
- DataGridViewRowsRemovedEventArgs.cs
- SerializationInfo.cs
- TextParagraphProperties.cs
- CreateParams.cs
- XmlMembersMapping.cs
- MultipartIdentifier.cs
- Object.cs