Code:
/ DotNET / DotNET / 8.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;
///
/// The exception that is thrown when using invalid arguments that are enumerators.
///
[HostProtection(SharedState = true)]
[Serializable]
public class InvalidEnumArgumentException : ArgumentException {
///
/// Initializes a new instance of the class without a message.
///
public InvalidEnumArgumentException() : this(null) {
}
///
/// Initializes a new instance of the class with
/// the specified message.
///
public InvalidEnumArgumentException(string message)
: base(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) {
}
///
/// Initializes a new instance of the class with a
/// message generated from the argument, invalid value, and enumeration
/// class.
///
public InvalidEnumArgumentException(string argumentName, int invalidValue, Type enumClass)
: base(SR.GetString(SR.InvalidEnumArgument,
argumentName,
invalidValue.ToString(CultureInfo.CurrentCulture),
enumClass.Name), argumentName) {
}
///
/// 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
- SolidColorBrush.cs
- AutoResetEvent.cs
- WebPartZoneCollection.cs
- GenerateTemporaryTargetAssembly.cs
- TargetInvocationException.cs
- SamlAttribute.cs
- RtfNavigator.cs
- XmlSchemaImport.cs
- MultipartIdentifier.cs
- webclient.cs
- UpdateException.cs
- TrackingProfileDeserializationException.cs
- DataSourceXmlTextReader.cs
- StateDesigner.Helpers.cs
- NativeMethods.cs
- WriteTimeStream.cs
- XmlQueryRuntime.cs
- StringOutput.cs
- PrintingPermissionAttribute.cs
- CompositionTarget.cs
- DataGridRow.cs
- ToggleButton.cs
- OperationContextScope.cs
- Point3DIndependentAnimationStorage.cs
- ServiceOperationInvoker.cs
- SqlGatherConsumedAliases.cs
- DoubleKeyFrameCollection.cs
- SmtpNtlmAuthenticationModule.cs
- StrokeDescriptor.cs
- RowCache.cs
- HttpListenerContext.cs
- ToolStripArrowRenderEventArgs.cs
- ContextMarshalException.cs
- pingexception.cs
- WebZone.cs
- TextTreeTextNode.cs
- PipelineModuleStepContainer.cs
- Tile.cs
- CachedFontFamily.cs
- PackageRelationshipCollection.cs
- Utils.cs
- AssemblyBuilder.cs
- SecurityException.cs
- PropertyItem.cs
- NameValueConfigurationElement.cs
- ToolStripPanelRow.cs
- GridViewDeletedEventArgs.cs
- FlowDocumentFormatter.cs
- GridViewRowEventArgs.cs
- IgnoreSectionHandler.cs
- ProgressBarHighlightConverter.cs
- InputEventArgs.cs
- AnnotationComponentManager.cs
- GridViewCommandEventArgs.cs
- LocatorBase.cs
- AlignmentXValidation.cs
- XNameTypeConverter.cs
- FontCollection.cs
- RegisteredArrayDeclaration.cs
- TripleDES.cs
- SourceLineInfo.cs
- PeerCredentialElement.cs
- SettingsAttributeDictionary.cs
- TextRangeProviderWrapper.cs
- WizardStepBase.cs
- TextTrailingCharacterEllipsis.cs
- PointLight.cs
- TableHeaderCell.cs
- DocumentEventArgs.cs
- SoapEnumAttribute.cs
- Point3DIndependentAnimationStorage.cs
- KeyValuePairs.cs
- DataSetMappper.cs
- Helpers.cs
- StrokeCollection.cs
- HttpCacheVary.cs
- XmlSchemaChoice.cs
- PartitionedStream.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- XmlElementList.cs
- StrongNameMembershipCondition.cs
- Transform3DGroup.cs
- InvalidFilterCriteriaException.cs
- EventHandlingScope.cs
- RecognizeCompletedEventArgs.cs
- CodeDefaultValueExpression.cs
- SecureEnvironment.cs
- ThaiBuddhistCalendar.cs
- ListBox.cs
- RawStylusInput.cs
- GridViewUpdatedEventArgs.cs
- _ProxyRegBlob.cs
- FixedNode.cs
- DataError.cs
- OperationContext.cs
- ParenthesizePropertyNameAttribute.cs
- WriteableBitmap.cs
- DesignerGenericWebPart.cs
- Int64Converter.cs
- CheckBoxStandardAdapter.cs