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; ////// [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
- CompModSwitches.cs
- HtmlContainerControl.cs
- SiteMapNodeItem.cs
- HierarchicalDataSourceConverter.cs
- TraceUtility.cs
- _CacheStreams.cs
- XmlWrappingReader.cs
- ProcessHost.cs
- Camera.cs
- SHA512Managed.cs
- UInt16Storage.cs
- DbExpressionVisitor_TResultType.cs
- DataKeyArray.cs
- FocusManager.cs
- DataView.cs
- webclient.cs
- BlurEffect.cs
- PageSetupDialog.cs
- ClientTarget.cs
- CallInfo.cs
- FloaterBaseParaClient.cs
- SecurityState.cs
- DiscoveryReferences.cs
- PagerSettings.cs
- COM2TypeInfoProcessor.cs
- PeerEndPoint.cs
- DataGridState.cs
- PropertyPushdownHelper.cs
- Propagator.cs
- HttpProtocolReflector.cs
- SafePointer.cs
- arclist.cs
- DoubleSumAggregationOperator.cs
- DataGridrowEditEndingEventArgs.cs
- ToolStripDesignerUtils.cs
- TTSVoice.cs
- SystemColors.cs
- Imaging.cs
- rsa.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ConfigurationConverterBase.cs
- RetriableClipboard.cs
- FormViewActionList.cs
- Thread.cs
- VirtualPath.cs
- ButtonChrome.cs
- XmlObjectSerializerReadContextComplex.cs
- ClientApiGenerator.cs
- StorageEndPropertyMapping.cs
- DataGridViewSortCompareEventArgs.cs
- PassportAuthenticationModule.cs
- MarkedHighlightComponent.cs
- UICuesEvent.cs
- AliasedSlot.cs
- MoveSizeWinEventHandler.cs
- XmlUtilWriter.cs
- ResourceDefaultValueAttribute.cs
- SqlDesignerDataSourceView.cs
- Attributes.cs
- XmlHierarchyData.cs
- ObjectTag.cs
- TypeUsageBuilder.cs
- ArglessEventHandlerProxy.cs
- Rfc2898DeriveBytes.cs
- RepeatButton.cs
- serverconfig.cs
- FileReservationCollection.cs
- XmlTextWriter.cs
- exports.cs
- SByteStorage.cs
- EffectiveValueEntry.cs
- TextTreeUndoUnit.cs
- CompressedStack.cs
- SafeTokenHandle.cs
- NullableBoolConverter.cs
- StateRuntime.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PixelShader.cs
- RangeValidator.cs
- InvokeProviderWrapper.cs
- NameValueConfigurationElement.cs
- WebEventTraceProvider.cs
- SqlDataSourceSelectingEventArgs.cs
- RadioButtonPopupAdapter.cs
- TableColumn.cs
- PathNode.cs
- RowsCopiedEventArgs.cs
- HttpUnhandledOperationInvoker.cs
- MenuItemCollection.cs
- ReaderWriterLockSlim.cs
- ConcurrentStack.cs
- XmlQueryContext.cs
- CanExecuteRoutedEventArgs.cs
- Interlocked.cs
- OraclePermission.cs
- InstanceCreationEditor.cs
- Hex.cs
- StringKeyFrameCollection.cs
- WindowsIdentity.cs
- TouchesOverProperty.cs