Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SafePEFileHandle.cs
- GeometryDrawing.cs
- InputBindingCollection.cs
- RequestCachingSection.cs
- Grid.cs
- IssuanceLicense.cs
- DoubleStorage.cs
- GlyphCollection.cs
- DataGridHeaderBorder.cs
- DebuggerAttributes.cs
- validationstate.cs
- SqlDataSourceCommandEventArgs.cs
- Int32Collection.cs
- _DisconnectOverlappedAsyncResult.cs
- Nullable.cs
- Nullable.cs
- CodeTypeMember.cs
- FilteredAttributeCollection.cs
- TextEditorDragDrop.cs
- Internal.cs
- StylusDownEventArgs.cs
- SortKey.cs
- MdiWindowListItemConverter.cs
- TextServicesProperty.cs
- TextMessageEncoder.cs
- Expr.cs
- Highlights.cs
- DecoderFallbackWithFailureFlag.cs
- HtmlWindow.cs
- TextUtf8RawTextWriter.cs
- SaveFileDialog.cs
- Attributes.cs
- CalendarDateRangeChangingEventArgs.cs
- EntityContainerEmitter.cs
- ListQueryResults.cs
- EffectiveValueEntry.cs
- LinkLabelLinkClickedEvent.cs
- UmAlQuraCalendar.cs
- SymbolResolver.cs
- ExpanderAutomationPeer.cs
- SqlDataReaderSmi.cs
- CodeSnippetStatement.cs
- ToolStripRenderEventArgs.cs
- AsyncCompletedEventArgs.cs
- XmlUtilWriter.cs
- SystemUdpStatistics.cs
- Message.cs
- MarkedHighlightComponent.cs
- ColorAnimation.cs
- WebBrowser.cs
- coordinatorscratchpad.cs
- SeparatorAutomationPeer.cs
- MessageAction.cs
- PartitionedStreamMerger.cs
- CompositeTypefaceMetrics.cs
- UntypedNullExpression.cs
- CellNormalizer.cs
- Html32TextWriter.cs
- Facet.cs
- OutputCacheSettings.cs
- SynchronizationContext.cs
- PowerModeChangedEventArgs.cs
- SmtpClient.cs
- TextMarkerSource.cs
- BitmapScalingModeValidation.cs
- WindowsFormsHostAutomationPeer.cs
- GeometryCombineModeValidation.cs
- XmlValueConverter.cs
- ExpressionConverter.cs
- DataBoundControlAdapter.cs
- XmlConverter.cs
- OracleRowUpdatingEventArgs.cs
- VariableAction.cs
- SplitterEvent.cs
- ByteRangeDownloader.cs
- WhitespaceSignificantCollectionAttribute.cs
- CodeAttributeDeclarationCollection.cs
- DoubleKeyFrameCollection.cs
- BitmapEffectInputConnector.cs
- Interop.cs
- COMException.cs
- xmlformatgeneratorstatics.cs
- ClientSettingsProvider.cs
- ThreadStartException.cs
- PropertyGeneratedEventArgs.cs
- PolicyManager.cs
- CodeDOMProvider.cs
- WmlMobileTextWriter.cs
- PrintingPermission.cs
- PropertyChangingEventArgs.cs
- ScriptManager.cs
- contentDescriptor.cs
- ClientSettingsStore.cs
- XhtmlTextWriter.cs
- DbConvert.cs
- TraceLog.cs
- DataServiceQuery.cs
- HtmlImage.cs
- DateTimeUtil.cs
- DBDataPermissionAttribute.cs