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
- RemoteDebugger.cs
- BamlResourceSerializer.cs
- RequiredFieldValidator.cs
- IndividualDeviceConfig.cs
- WindowsGraphics2.cs
- MenuAutoFormat.cs
- CategoryAttribute.cs
- PaginationProgressEventArgs.cs
- VirtualPathProvider.cs
- embossbitmapeffect.cs
- AsyncResult.cs
- SqlNotificationEventArgs.cs
- DataPointer.cs
- DynamicPropertyHolder.cs
- PropertyCollection.cs
- Predicate.cs
- VisualCollection.cs
- TextServicesPropertyRanges.cs
- MethodCallConverter.cs
- DbExpressionVisitor_TResultType.cs
- DictionaryGlobals.cs
- WindowsListViewSubItem.cs
- XLinq.cs
- Block.cs
- SqlCacheDependencyDatabaseCollection.cs
- Screen.cs
- WriteFileContext.cs
- PublisherIdentityPermission.cs
- BamlLocalizableResourceKey.cs
- KeyNotFoundException.cs
- DBBindings.cs
- PixelShader.cs
- EnterpriseServicesHelper.cs
- RuntimeEnvironment.cs
- SessionPageStateSection.cs
- ApplicationInfo.cs
- VerificationAttribute.cs
- JournalEntryListConverter.cs
- SoapDocumentMethodAttribute.cs
- prompt.cs
- WorkflowStateRollbackService.cs
- AttributeSetAction.cs
- MetadataPropertyAttribute.cs
- Literal.cs
- DataQuery.cs
- TypefaceCollection.cs
- HttpCachePolicy.cs
- PassportAuthenticationEventArgs.cs
- FileSystemInfo.cs
- EntitySqlQueryBuilder.cs
- DataControlField.cs
- Utils.cs
- EventLogWatcher.cs
- SecureStringHasher.cs
- ContainerParaClient.cs
- ProcessProtocolHandler.cs
- DecimalKeyFrameCollection.cs
- QueryExecutionOption.cs
- _RequestLifetimeSetter.cs
- WebPartPersonalization.cs
- Vector.cs
- XmlReaderDelegator.cs
- EntityCommandExecutionException.cs
- Process.cs
- CFStream.cs
- OpenTypeLayoutCache.cs
- BooleanFacetDescriptionElement.cs
- NetworkInformationException.cs
- ConfigXmlDocument.cs
- LinkedResource.cs
- NumericPagerField.cs
- Keywords.cs
- CodeAssignStatement.cs
- Point3DAnimationUsingKeyFrames.cs
- ReadOnlyState.cs
- SafeArrayTypeMismatchException.cs
- Utils.cs
- VisualStyleInformation.cs
- TextElementEnumerator.cs
- OpenTypeLayout.cs
- XmlElement.cs
- LoginCancelEventArgs.cs
- PreviewPageInfo.cs
- ArrayList.cs
- LinqDataSourceHelper.cs
- PrimitiveXmlSerializers.cs
- CollectionTypeElement.cs
- OracleRowUpdatingEventArgs.cs
- ActiveXHelper.cs
- ComponentRenameEvent.cs
- MemberRestriction.cs
- EllipseGeometry.cs
- CallSiteBinder.cs
- SvcMapFile.cs
- Authorization.cs
- XmlObjectSerializerReadContextComplexJson.cs
- SqlNotificationRequest.cs
- ResourceAttributes.cs
- StateFinalizationActivity.cs
- _IPv6Address.cs