Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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) {
}
}
}
// 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;
///
/// 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) {
}
}
}
// 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
- PageContentCollection.cs
- GridViewHeaderRowPresenter.cs
- Matrix3D.cs
- XmlReflectionMember.cs
- HtmlLink.cs
- MULTI_QI.cs
- BamlTreeNode.cs
- TextEditorDragDrop.cs
- SymbolPair.cs
- FileDialog.cs
- RangeBaseAutomationPeer.cs
- TraceEventCache.cs
- Condition.cs
- DataGridViewImageCell.cs
- IsolatedStorageFile.cs
- LoadGrammarCompletedEventArgs.cs
- BindingManagerDataErrorEventArgs.cs
- UserControlAutomationPeer.cs
- TextElementCollectionHelper.cs
- StrongNameMembershipCondition.cs
- Route.cs
- CodeIterationStatement.cs
- LocalizedNameDescriptionPair.cs
- XmlTextReader.cs
- IncrementalReadDecoders.cs
- _CacheStreams.cs
- DocumentSchemaValidator.cs
- TableStyle.cs
- MarkupProperty.cs
- TaskHelper.cs
- ObjectConverter.cs
- CompressStream.cs
- AuthenticationModuleElementCollection.cs
- CacheOutputQuery.cs
- CompModHelpers.cs
- util.cs
- EnumConverter.cs
- PerformanceCounterPermissionEntry.cs
- Transform3DGroup.cs
- DataGridViewTextBoxColumn.cs
- SourceInterpreter.cs
- DragDrop.cs
- MdiWindowListItemConverter.cs
- StructuredTypeInfo.cs
- Context.cs
- DataGridViewColumnCollectionDialog.cs
- LocatorBase.cs
- TextRangeEditLists.cs
- FormParameter.cs
- RoutedUICommand.cs
- SingleResultAttribute.cs
- CacheRequest.cs
- CodeTypeParameter.cs
- CommandHelper.cs
- SmtpLoginAuthenticationModule.cs
- HttpGetProtocolReflector.cs
- WebPartDescriptionCollection.cs
- FullTextBreakpoint.cs
- ObjectItemCollection.cs
- ValidationRule.cs
- XmlSchemaException.cs
- MissingMethodException.cs
- WsiProfilesElementCollection.cs
- X509Extension.cs
- DateTimeSerializationSection.cs
- CancelEventArgs.cs
- sqlstateclientmanager.cs
- TimeZone.cs
- Line.cs
- HttpConfigurationContext.cs
- TextPointer.cs
- EntityViewContainer.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- SqlResolver.cs
- EntityDataSourceReferenceGroup.cs
- PointUtil.cs
- CommonProperties.cs
- BamlTreeUpdater.cs
- XsdSchemaFileEditor.cs
- WinEventQueueItem.cs
- SessionViewState.cs
- DefaultBinder.cs
- PropertyChangedEventManager.cs
- TextBoxBase.cs
- HMACSHA512.cs
- AdjustableArrowCap.cs
- CqlParser.cs
- sqlser.cs
- CollectionViewGroupRoot.cs
- UnsafeNativeMethodsCLR.cs
- DataGridViewDesigner.cs
- TypeEnumerableViewSchema.cs
- ParentUndoUnit.cs
- IMembershipProvider.cs
- PageAdapter.cs
- IisNotInstalledException.cs
- StylusLogic.cs
- BasicHttpMessageCredentialType.cs
- AlternateView.cs
- MaskedTextProvider.cs