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
- PrintPageEvent.cs
- WebResponse.cs
- Match.cs
- SqlTrackingWorkflowInstance.cs
- SqlWebEventProvider.cs
- JsonXmlDataContract.cs
- SettingsAttributeDictionary.cs
- CompilerResults.cs
- SelectorAutomationPeer.cs
- DataGridViewCellStateChangedEventArgs.cs
- ServicePoint.cs
- MarshalByValueComponent.cs
- WhitespaceReader.cs
- IOException.cs
- XamlFigureLengthSerializer.cs
- AnimationTimeline.cs
- DoubleCollectionValueSerializer.cs
- storepermission.cs
- PageRequestManager.cs
- ParseChildrenAsPropertiesAttribute.cs
- UserUseLicenseDictionaryLoader.cs
- Tile.cs
- BitmapData.cs
- ComboBoxRenderer.cs
- SettingsAttributeDictionary.cs
- EngineSiteSapi.cs
- MultipleViewProviderWrapper.cs
- EtwTrace.cs
- XmlSchemaGroupRef.cs
- QualifiedId.cs
- HorizontalAlignConverter.cs
- ArraySegment.cs
- NotificationContext.cs
- DependencyObjectPropertyDescriptor.cs
- UrlUtility.cs
- StringFunctions.cs
- SystemTcpConnection.cs
- HostAdapter.cs
- EntityContainerEntitySet.cs
- CharAnimationUsingKeyFrames.cs
- TextBlock.cs
- UserMapPath.cs
- XPathSelfQuery.cs
- ContentType.cs
- PropertyMappingExceptionEventArgs.cs
- MsmqIntegrationMessagePool.cs
- QfeChecker.cs
- FixedStringLookup.cs
- ReferenceSchema.cs
- CompiledRegexRunnerFactory.cs
- EventLogSession.cs
- InvalidPropValue.cs
- RadioButtonBaseAdapter.cs
- Converter.cs
- HiddenFieldPageStatePersister.cs
- FormViewDeleteEventArgs.cs
- StringValueSerializer.cs
- PersonalizationEntry.cs
- XmlAttributeCollection.cs
- SqlWebEventProvider.cs
- HitTestWithPointDrawingContextWalker.cs
- EnumerableRowCollection.cs
- DataGridViewLinkColumn.cs
- DbMetaDataFactory.cs
- ToolStripContentPanel.cs
- PartialClassGenerationTask.cs
- DbDataRecord.cs
- AsyncOperationManager.cs
- WebPartDisplayModeCancelEventArgs.cs
- MetafileHeaderWmf.cs
- Authorization.cs
- FrameworkTemplate.cs
- UncommonField.cs
- SharedPerformanceCounter.cs
- HttpModuleCollection.cs
- FrameworkTemplate.cs
- DeferredElementTreeState.cs
- MediaPlayer.cs
- MarshalByRefObject.cs
- HelpKeywordAttribute.cs
- AccessKeyManager.cs
- PhonemeEventArgs.cs
- IconConverter.cs
- TypeExtensions.cs
- TableLayoutStyleCollection.cs
- IgnoreFileBuildProvider.cs
- DetailsViewDeleteEventArgs.cs
- ToolStripSeparatorRenderEventArgs.cs
- SpellCheck.cs
- Rectangle.cs
- SqlDataReader.cs
- ChannelBinding.cs
- PreservationFileWriter.cs
- UrlParameterReader.cs
- SystemException.cs
- QilLiteral.cs
- X509CertificateCollection.cs
- RelationalExpressions.cs
- LoadRetryStrategyFactory.cs
- StorageInfo.cs