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
- PowerStatus.cs
- CheckBoxPopupAdapter.cs
- HttpsChannelListener.cs
- ElementNotEnabledException.cs
- RightsManagementErrorHandler.cs
- MetadataItem.cs
- PropertyManager.cs
- HttpCookieCollection.cs
- ReadonlyMessageFilter.cs
- StartUpEventArgs.cs
- PageVisual.cs
- TextViewBase.cs
- PreviewKeyDownEventArgs.cs
- EndpointReference.cs
- ObjectItemConventionAssemblyLoader.cs
- EntitySetDataBindingList.cs
- BitmapMetadata.cs
- EndpointFilterProvider.cs
- NextPreviousPagerField.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ArglessEventHandlerProxy.cs
- CompilationRelaxations.cs
- ParserOptions.cs
- Codec.cs
- DataControlPagerLinkButton.cs
- Point3DValueSerializer.cs
- MethodImplAttribute.cs
- hresults.cs
- SortedDictionary.cs
- XmlStreamNodeWriter.cs
- WebBrowserDocumentCompletedEventHandler.cs
- _TransmitFileOverlappedAsyncResult.cs
- EventWaitHandle.cs
- ToolboxItemAttribute.cs
- BridgeDataReader.cs
- VideoDrawing.cs
- TreeViewItem.cs
- WorkflowRuntimeServiceElementCollection.cs
- TogglePattern.cs
- EntityConnectionStringBuilder.cs
- httpstaticobjectscollection.cs
- BaseDataBoundControl.cs
- ObjectDataSourceSelectingEventArgs.cs
- SimpleExpression.cs
- XmlNodeChangedEventManager.cs
- VisualStates.cs
- GPRECTF.cs
- CodeNamespaceImportCollection.cs
- XsdDataContractImporter.cs
- MessageSmuggler.cs
- SizeConverter.cs
- FlowDocumentScrollViewer.cs
- SrgsSemanticInterpretationTag.cs
- DateTimeStorage.cs
- DataGridViewCell.cs
- XpsPackagingException.cs
- PropertyTab.cs
- IODescriptionAttribute.cs
- WebEventCodes.cs
- URI.cs
- SqlRowUpdatedEvent.cs
- SafeSecurityHelper.cs
- ListParagraph.cs
- X509CertificateStore.cs
- TripleDESCryptoServiceProvider.cs
- SystemColors.cs
- RegexTree.cs
- ArrayTypeMismatchException.cs
- WindowsTokenRoleProvider.cs
- AvtEvent.cs
- Pool.cs
- unsafeIndexingFilterStream.cs
- ObjectDataSource.cs
- CoreChannel.cs
- SynchronousChannelMergeEnumerator.cs
- DCSafeHandle.cs
- GenericNameHandler.cs
- _NativeSSPI.cs
- FamilyMapCollection.cs
- ValidationHelper.cs
- EndpointDiscoveryElement.cs
- WindowsTokenRoleProvider.cs
- TraceHandler.cs
- TypeExtensionConverter.cs
- SafeNativeMethods.cs
- Hex.cs
- LocationChangedEventArgs.cs
- DataGridViewRowHeaderCell.cs
- BitmapEffectRenderDataResource.cs
- Registry.cs
- CompatibleComparer.cs
- FlowPosition.cs
- log.cs
- CompiledAction.cs
- DateTimeOffset.cs
- HttpConfigurationContext.cs
- AuthStoreRoleProvider.cs
- TaiwanCalendar.cs
- DomainConstraint.cs
- DBConnectionString.cs