Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Point3DConverter.cs
- BinaryFormatterWriter.cs
- CodeSubDirectoriesCollection.cs
- CapacityStreamGeometryContext.cs
- Stack.cs
- ValueCollectionParameterReader.cs
- UriTemplateTrieLocation.cs
- Pair.cs
- OleDbException.cs
- NativeMethods.cs
- OdbcHandle.cs
- TextContainer.cs
- Vector3DCollectionConverter.cs
- CompiledQueryCacheEntry.cs
- FixedSOMSemanticBox.cs
- RadioButtonBaseAdapter.cs
- MexTcpBindingCollectionElement.cs
- AvTraceFormat.cs
- ToolStripSettings.cs
- MetadataSource.cs
- ResourcePermissionBaseEntry.cs
- CultureTable.cs
- MemoryMappedView.cs
- TdsValueSetter.cs
- xml.cs
- DrawItemEvent.cs
- FlatButtonAppearance.cs
- XmlIncludeAttribute.cs
- KeyValuePairs.cs
- ComponentDispatcher.cs
- VirtualizingPanel.cs
- EncoderNLS.cs
- SystemIPGlobalProperties.cs
- PropertyGridEditorPart.cs
- DbException.cs
- MetafileHeaderWmf.cs
- FilterQuery.cs
- ContextProperty.cs
- Stylesheet.cs
- PasswordTextContainer.cs
- Command.cs
- RtfNavigator.cs
- WindowsTreeView.cs
- AttributeExtensions.cs
- DynamicActivityXamlReader.cs
- HttpUnhandledOperationInvoker.cs
- loginstatus.cs
- ActiveXSite.cs
- ExtensionQuery.cs
- TimeSpan.cs
- WebPartHeaderCloseVerb.cs
- EntityContainer.cs
- ListViewTableRow.cs
- serverconfig.cs
- ZipIOCentralDirectoryFileHeader.cs
- Tokenizer.cs
- AstTree.cs
- ConstantProjectedSlot.cs
- HitTestWithPointDrawingContextWalker.cs
- OrderPreservingSpoolingTask.cs
- InstallerTypeAttribute.cs
- DbExpressionVisitor.cs
- Clock.cs
- AccessDataSourceView.cs
- Run.cs
- CaretElement.cs
- NotifyIcon.cs
- SoapHelper.cs
- ViewPort3D.cs
- ContentValidator.cs
- ObjectView.cs
- KeyValueConfigurationCollection.cs
- ClientCultureInfo.cs
- Utils.cs
- ConfigPathUtility.cs
- CultureTableRecord.cs
- DigestTraceRecordHelper.cs
- MD5CryptoServiceProvider.cs
- EventSetter.cs
- _UriSyntax.cs
- FloaterParaClient.cs
- ViewEvent.cs
- DropSource.cs
- X509ChainElement.cs
- EditorPartChrome.cs
- RsaKeyIdentifierClause.cs
- InputBuffer.cs
- KnownAssembliesSet.cs
- CqlWriter.cs
- OdbcInfoMessageEvent.cs
- XmlArrayItemAttributes.cs
- FileReservationCollection.cs
- XmlUTF8TextReader.cs
- Math.cs
- DataGridViewDataConnection.cs
- SafeArchiveContext.cs
- SerializableReadOnlyDictionary.cs
- XmlPreloadedResolver.cs
- WebBaseEventKeyComparer.cs
- MexBindingElement.cs