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
- EnumUnknown.cs
- PageCatalogPart.cs
- DataGridViewTextBoxColumn.cs
- GradientBrush.cs
- ServiceOperationListItem.cs
- SoapSchemaExporter.cs
- BitmapSourceSafeMILHandle.cs
- UIServiceHelper.cs
- TimelineClockCollection.cs
- CompilationLock.cs
- TiffBitmapDecoder.cs
- ReferenceService.cs
- WinFormsSecurity.cs
- WebPartManager.cs
- OletxTransactionManager.cs
- PerfCounters.cs
- EditCommandColumn.cs
- XmlSubtreeReader.cs
- FixedSOMElement.cs
- XsdValidatingReader.cs
- TreeViewCancelEvent.cs
- Interlocked.cs
- FontNameConverter.cs
- WbemException.cs
- XhtmlBasicSelectionListAdapter.cs
- RecordManager.cs
- Span.cs
- ReliabilityContractAttribute.cs
- RenderTargetBitmap.cs
- StringReader.cs
- ApplicationFileParser.cs
- DecimalConverter.cs
- PartialToken.cs
- StylusSystemGestureEventArgs.cs
- DesignerTextBoxAdapter.cs
- ColorTransformHelper.cs
- PresentationTraceSources.cs
- DataGridViewColumnCollectionDialog.cs
- ContractAdapter.cs
- QueryExtender.cs
- SqlRemoveConstantOrderBy.cs
- ConvertEvent.cs
- ExpandSegmentCollection.cs
- DataGridViewCellCancelEventArgs.cs
- Baml2006KnownTypes.cs
- PolyBezierSegmentFigureLogic.cs
- FormsAuthenticationConfiguration.cs
- CommandConverter.cs
- PointLightBase.cs
- EtwTrace.cs
- TreeView.cs
- CompoundFileStorageReference.cs
- configsystem.cs
- MutableAssemblyCacheEntry.cs
- EntityDataSourceDesignerHelper.cs
- InvalidateEvent.cs
- AdRotator.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DataTemplateKey.cs
- FieldBuilder.cs
- EditorResources.cs
- AnnotationResourceChangedEventArgs.cs
- WebHeaderCollection.cs
- TextSpan.cs
- DtcInterfaces.cs
- DBConcurrencyException.cs
- OracleConnectionString.cs
- EventSinkActivityDesigner.cs
- _SpnDictionary.cs
- PackUriHelper.cs
- UnsafeNativeMethodsPenimc.cs
- CoordinationService.cs
- GACMembershipCondition.cs
- SQlBooleanStorage.cs
- EventData.cs
- DataBoundControl.cs
- Cursor.cs
- Win32.cs
- EdmTypeAttribute.cs
- TextFragmentEngine.cs
- Types.cs
- LabelAutomationPeer.cs
- DurableInstanceProvider.cs
- OleServicesContext.cs
- DrawToolTipEventArgs.cs
- ErrorWebPart.cs
- PreservationFileReader.cs
- ConnectionManagementElementCollection.cs
- StreamedFramingRequestChannel.cs
- ExpressionConverter.cs
- UpdatePanelTrigger.cs
- GlobalEventManager.cs
- TypeFieldSchema.cs
- XmlComment.cs
- XhtmlBasicPanelAdapter.cs
- ParenthesizePropertyNameAttribute.cs
- TableParaClient.cs
- EpmHelper.cs
- TreeNodeConverter.cs
- PanelDesigner.cs