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
- DataObjectPastingEventArgs.cs
- ValidationSummary.cs
- CacheForPrimitiveTypes.cs
- ViewPort3D.cs
- ActiveXHelper.cs
- BamlWriter.cs
- CommandTreeTypeHelper.cs
- AssemblyResourceLoader.cs
- _LoggingObject.cs
- IPHostEntry.cs
- InvalidOperationException.cs
- PathHelper.cs
- ContainerFilterService.cs
- TextPatternIdentifiers.cs
- BoolExpr.cs
- InstallerTypeAttribute.cs
- DecoratedNameAttribute.cs
- TextAction.cs
- InvokeHandlers.cs
- Utils.cs
- NativeMethodsCLR.cs
- CompensationTokenData.cs
- PropertyGridCommands.cs
- DbResourceAllocator.cs
- HttpRequest.cs
- SoapAttributeAttribute.cs
- SequentialWorkflowHeaderFooter.cs
- SAPIEngineTypes.cs
- XmlCharCheckingWriter.cs
- XmlSortKeyAccumulator.cs
- IDReferencePropertyAttribute.cs
- MailMessageEventArgs.cs
- MediaTimeline.cs
- RadioButtonPopupAdapter.cs
- MDIClient.cs
- dataprotectionpermissionattribute.cs
- CodeAssignStatement.cs
- SqlFlattener.cs
- ListViewDeletedEventArgs.cs
- FileAuthorizationModule.cs
- ConfigurationSettings.cs
- BuildDependencySet.cs
- XmlUrlResolver.cs
- LineVisual.cs
- AttributeQuery.cs
- HandlerFactoryCache.cs
- SecurityTokenRequirement.cs
- SymLanguageType.cs
- DBCommandBuilder.cs
- ListViewGroupCollectionEditor.cs
- LocalizableAttribute.cs
- WmiEventSink.cs
- UtilityExtension.cs
- NumericUpDown.cs
- ResourceExpressionBuilder.cs
- SQLBytes.cs
- QueryModel.cs
- ZipArchive.cs
- ApplicationInterop.cs
- CompensatableTransactionScopeActivity.cs
- RepeaterDataBoundAdapter.cs
- TaskCanceledException.cs
- AuthorizationPolicyTypeElement.cs
- XsltFunctions.cs
- DataGridViewTextBoxCell.cs
- DataProviderNameConverter.cs
- Int32RectValueSerializer.cs
- DropShadowEffect.cs
- FeatureSupport.cs
- SafeRegistryHandle.cs
- AppModelKnownContentFactory.cs
- UrlRoutingHandler.cs
- IncrementalCompileAnalyzer.cs
- PropertyEntry.cs
- SQLDecimalStorage.cs
- _NetRes.cs
- PreviewPageInfo.cs
- DataGrid.cs
- SpeechSeg.cs
- WpfGeneratedKnownTypes.cs
- EntityViewGenerationAttribute.cs
- BitmapMetadataBlob.cs
- NativeMethods.cs
- PriorityRange.cs
- ConfigXmlCDataSection.cs
- ProfileSettingsCollection.cs
- XmlEventCache.cs
- XmlResolver.cs
- HtmlEmptyTagControlBuilder.cs
- TextStore.cs
- SurrogateDataContract.cs
- ColumnClickEvent.cs
- HttpCookie.cs
- XamlSerializerUtil.cs
- EmbeddedObject.cs
- UIElement3D.cs
- _KerberosClient.cs
- StringResourceManager.cs
- TextWriter.cs
- XPathAxisIterator.cs