Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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) { } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ThumbAutomationPeer.cs
- BinaryMethodMessage.cs
- XmlBinaryWriterSession.cs
- LocatorManager.cs
- DataServiceClientException.cs
- TrackingRecord.cs
- MeshGeometry3D.cs
- EntityParameterCollection.cs
- DesignerDataView.cs
- RefreshInfo.cs
- StandardMenuStripVerb.cs
- UnaryNode.cs
- Converter.cs
- KeyToListMap.cs
- ImportCatalogPart.cs
- XmlEncodedRawTextWriter.cs
- DetailsViewUpdatedEventArgs.cs
- InvalidCastException.cs
- PlatformNotSupportedException.cs
- ApplicationHost.cs
- AnchoredBlock.cs
- BigInt.cs
- WebScriptMetadataFormatter.cs
- XmlSerializationWriter.cs
- SessionPageStatePersister.cs
- XmlCharacterData.cs
- coordinator.cs
- DateTimeOffsetStorage.cs
- DataPointer.cs
- TypeExtensions.cs
- CallSite.cs
- OrderPreservingPipeliningSpoolingTask.cs
- ConstructorNeedsTagAttribute.cs
- ProxyHwnd.cs
- Directory.cs
- UniformGrid.cs
- DetailsViewDeleteEventArgs.cs
- HtmlInputReset.cs
- ObjectViewFactory.cs
- NullNotAllowedCollection.cs
- Int16.cs
- Membership.cs
- StoragePropertyMapping.cs
- IsolatedStorageFile.cs
- EtwTrace.cs
- MissingMethodException.cs
- OleStrCAMarshaler.cs
- DynamicActivityTypeDescriptor.cs
- DataGridViewCellFormattingEventArgs.cs
- ConditionalWeakTable.cs
- Filter.cs
- XmlDictionary.cs
- Quaternion.cs
- BamlLocalizableResourceKey.cs
- TableItemPattern.cs
- Accessible.cs
- HandleRef.cs
- BitSet.cs
- StateWorkerRequest.cs
- GeometryHitTestParameters.cs
- MimeWriter.cs
- ScrollData.cs
- StyleHelper.cs
- UpdatePanelControlTrigger.cs
- FontConverter.cs
- CatalogPartChrome.cs
- WebPartMenu.cs
- TimeSpanStorage.cs
- WebBrowsableAttribute.cs
- ItemList.cs
- DataService.cs
- SafeFileMapViewHandle.cs
- BlurEffect.cs
- KoreanLunisolarCalendar.cs
- TrackingProfileSerializer.cs
- FullTrustAssembly.cs
- XPathMessageFilterElementComparer.cs
- XmlLinkedNode.cs
- SeverityFilter.cs
- TextChange.cs
- XmlElement.cs
- Parallel.cs
- OracleDataAdapter.cs
- HwndKeyboardInputProvider.cs
- AccessDataSourceView.cs
- RoutingService.cs
- TextServicesCompartmentContext.cs
- SQLByteStorage.cs
- CaseExpr.cs
- OrCondition.cs
- AspCompat.cs
- XmlComplianceUtil.cs
- SqlServer2KCompatibilityAnnotation.cs
- ThreadExceptionDialog.cs
- PersistenceMetadataNamespace.cs
- MemoryRecordBuffer.cs
- XamlClipboardData.cs
- FixedStringLookup.cs
- CollectionView.cs
- ConfigurationSchemaErrors.cs