Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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) { } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FrugalList.cs
- XmlRawWriterWrapper.cs
- FlowNode.cs
- NotificationContext.cs
- IndentedTextWriter.cs
- IgnoreSection.cs
- Control.cs
- XmlSchemaGroup.cs
- Relationship.cs
- BaseComponentEditor.cs
- LogicalTreeHelper.cs
- ConcurrentBag.cs
- MethodResolver.cs
- Application.cs
- sqlinternaltransaction.cs
- CryptoApi.cs
- BitmapCacheBrush.cs
- PageRequestManager.cs
- NativeMethods.cs
- PipelineModuleStepContainer.cs
- SamlAttributeStatement.cs
- ShowExpandedMultiValueConverter.cs
- DataGridViewColumnCollectionEditor.cs
- XmlAttributeHolder.cs
- QueryContinueDragEvent.cs
- PathData.cs
- AppDomainUnloadedException.cs
- HandlerBase.cs
- DockProviderWrapper.cs
- FixedSOMSemanticBox.cs
- AttributeAction.cs
- StringUtil.cs
- FieldTemplateUserControl.cs
- MappedMetaModel.cs
- NestPullup.cs
- StorageConditionPropertyMapping.cs
- AmbientLight.cs
- ExpressionReplacer.cs
- ProfileEventArgs.cs
- BypassElementCollection.cs
- SetState.cs
- DesignSurfaceCollection.cs
- AdCreatedEventArgs.cs
- Point.cs
- ArraySortHelper.cs
- SchemaSetCompiler.cs
- SmtpNegotiateAuthenticationModule.cs
- ValueType.cs
- EntitySetBaseCollection.cs
- ObjectAnimationUsingKeyFrames.cs
- CardSpacePolicyElement.cs
- KnowledgeBase.cs
- TransformBlockRequest.cs
- PostBackOptions.cs
- Identifier.cs
- Int32RectValueSerializer.cs
- CompiledRegexRunnerFactory.cs
- HtmlAnchor.cs
- HttpRequestTraceRecord.cs
- MissingMemberException.cs
- RightsManagementManager.cs
- PrivateFontCollection.cs
- ExtentJoinTreeNode.cs
- XmlName.cs
- DbExpressionVisitor_TResultType.cs
- SqlFactory.cs
- XmlSerializer.cs
- FileIOPermission.cs
- ListBoxAutomationPeer.cs
- XmlDownloadManager.cs
- SqlBinder.cs
- MatrixCamera.cs
- ImageClickEventArgs.cs
- Logging.cs
- BStrWrapper.cs
- LambdaCompiler.Lambda.cs
- ErrorItem.cs
- CompositionTarget.cs
- XmlTextReader.cs
- GridViewSelectEventArgs.cs
- BufferAllocator.cs
- documentation.cs
- ButtonAutomationPeer.cs
- HttpInputStream.cs
- DataGridColumnFloatingHeader.cs
- InterleavedZipPartStream.cs
- AdapterUtil.cs
- ProcessHostServerConfig.cs
- SourceLineInfo.cs
- Exceptions.cs
- InheritablePropertyChangeInfo.cs
- SctClaimDictionary.cs
- ThreadInterruptedException.cs
- Screen.cs
- SendMessageContent.cs
- PropertyChangeTracker.cs
- FileChangesMonitor.cs
- JapaneseLunisolarCalendar.cs
- XmlIgnoreAttribute.cs
- XmlWrappingReader.cs