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
- XmlReflectionImporter.cs
- ButtonField.cs
- ISCIIEncoding.cs
- RectConverter.cs
- ColumnClickEvent.cs
- DataContractSet.cs
- Rectangle.cs
- HttpPostProtocolImporter.cs
- XmlCharacterData.cs
- Model3DGroup.cs
- WebPartZoneCollection.cs
- DigitalSignatureProvider.cs
- PenThreadPool.cs
- HealthMonitoringSection.cs
- TrueReadOnlyCollection.cs
- CurrentChangingEventArgs.cs
- PointValueSerializer.cs
- LinearQuaternionKeyFrame.cs
- SafeBitVector32.cs
- ProbeMatches11.cs
- RawTextInputReport.cs
- InstancePersistence.cs
- DataGridViewComboBoxColumn.cs
- HttpCacheVaryByContentEncodings.cs
- Page.cs
- EntityContainerRelationshipSet.cs
- IpcChannelHelper.cs
- DrawTreeNodeEventArgs.cs
- DesignerWidgets.cs
- BaseValidator.cs
- DEREncoding.cs
- Composition.cs
- SocketElement.cs
- FieldBuilder.cs
- DataBindingCollection.cs
- SerializableAttribute.cs
- DefaultProxySection.cs
- IdSpace.cs
- TextServicesContext.cs
- CurrencyWrapper.cs
- SqlFunctionAttribute.cs
- TdsParameterSetter.cs
- LinqTreeNodeEvaluator.cs
- LookupBindingPropertiesAttribute.cs
- TextLine.cs
- InstallerTypeAttribute.cs
- Propagator.ExtentPlaceholderCreator.cs
- PrePostDescendentsWalker.cs
- EmissiveMaterial.cs
- Tokenizer.cs
- AudioStateChangedEventArgs.cs
- ExecutionEngineException.cs
- WebServicesDescriptionAttribute.cs
- XsdCachingReader.cs
- Stack.cs
- CompModSwitches.cs
- DataGridViewTextBoxCell.cs
- ThreadBehavior.cs
- TableLayoutStyle.cs
- _HeaderInfo.cs
- EUCJPEncoding.cs
- LayoutTableCell.cs
- AddInActivator.cs
- Event.cs
- LateBoundBitmapDecoder.cs
- TextMarkerSource.cs
- BindingCollection.cs
- WorkflowRuntimeService.cs
- Size.cs
- XamlTemplateSerializer.cs
- PropertyGeneratedEventArgs.cs
- CharUnicodeInfo.cs
- Matrix3DStack.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ViewSimplifier.cs
- CompilerGlobalScopeAttribute.cs
- SqlDataSourceView.cs
- PointCollection.cs
- StreamWriter.cs
- PageCatalogPartDesigner.cs
- MaterialCollection.cs
- ObjectViewEntityCollectionData.cs
- Graphics.cs
- JpegBitmapEncoder.cs
- ObfuscateAssemblyAttribute.cs
- ChildrenQuery.cs
- CmsInterop.cs
- FacetValueContainer.cs
- Transform3D.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- FastPropertyAccessor.cs
- GraphicsPath.cs
- IWorkflowDebuggerService.cs
- KeyNotFoundException.cs
- RepeaterItem.cs
- ContractMapping.cs
- Crc32.cs
- StrokeIntersection.cs
- GeneralTransform3D.cs
- ChannelFactoryRefCache.cs