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
- PageParser.cs
- DelegateArgumentValue.cs
- DependencyPropertyValueSerializer.cs
- StrongNameKeyPair.cs
- ErrorEventArgs.cs
- PointLight.cs
- SectionRecord.cs
- DefinitionUpdate.cs
- IdentityReference.cs
- PageContentAsyncResult.cs
- ButtonPopupAdapter.cs
- ExpressionBindingCollection.cs
- EventHandlerService.cs
- BinaryObjectReader.cs
- RuntimeWrappedException.cs
- MemoryStream.cs
- SapiRecognizer.cs
- ObjectQueryExecutionPlan.cs
- VerificationException.cs
- HtmlInputText.cs
- ProxyElement.cs
- DataGridViewCellStyleChangedEventArgs.cs
- RoleManagerSection.cs
- CategoryNameCollection.cs
- SpellerHighlightLayer.cs
- ChangeDirector.cs
- BitmapSizeOptions.cs
- ImageSourceConverter.cs
- HttpListenerException.cs
- SqlMethods.cs
- DynamicMethod.cs
- XsdDuration.cs
- SchemaNames.cs
- URL.cs
- XamlHttpHandlerFactory.cs
- OutputWindow.cs
- SqlRecordBuffer.cs
- DataGridViewEditingControlShowingEventArgs.cs
- AssemblyNameProxy.cs
- ApplicationFileCodeDomTreeGenerator.cs
- DataContractSerializer.cs
- RefExpr.cs
- KeyValueConfigurationElement.cs
- MachineKeyConverter.cs
- ObjectAssociationEndMapping.cs
- PnrpPeerResolver.cs
- MemberPath.cs
- CodeTypeReferenceExpression.cs
- SectionVisual.cs
- ControlBindingsCollection.cs
- ConnectorDragDropGlyph.cs
- HtmlElementCollection.cs
- PublisherIdentityPermission.cs
- SqlDataSource.cs
- EndSelectCardRequest.cs
- Win32.cs
- BinaryFormatterWriter.cs
- CustomAssemblyResolver.cs
- filewebresponse.cs
- SpotLight.cs
- DataService.cs
- IPHostEntry.cs
- MultiByteCodec.cs
- Geometry.cs
- XmlEncoding.cs
- XmlSchemaChoice.cs
- HostedHttpRequestAsyncResult.cs
- LinkLabelLinkClickedEvent.cs
- EnumType.cs
- EntityWrapperFactory.cs
- XmlExtensionFunction.cs
- MemoryRecordBuffer.cs
- NextPreviousPagerField.cs
- UserControl.cs
- DataObjectFieldAttribute.cs
- Native.cs
- FileLevelControlBuilderAttribute.cs
- IfJoinedCondition.cs
- HtmlGenericControl.cs
- Knowncolors.cs
- _SafeNetHandles.cs
- LookupNode.cs
- HtmlEmptyTagControlBuilder.cs
- Model3D.cs
- TableRow.cs
- RightsManagementEncryptionTransform.cs
- UrlPropertyAttribute.cs
- XsltSettings.cs
- MdImport.cs
- DependencyPropertyKind.cs
- CollectionBuilder.cs
- WsdlBuildProvider.cs
- SQLSingleStorage.cs
- XamlStackWriter.cs
- NavigationPropertyEmitter.cs
- ProxyWebPart.cs
- PersonalizationDictionary.cs
- SHA512Cng.cs
- HashJoinQueryOperatorEnumerator.cs
- AttributeSetAction.cs