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
- securestring.cs
- PeerMessageDispatcher.cs
- IPipelineRuntime.cs
- UriSectionReader.cs
- MultiDataTrigger.cs
- PropertyDescriptorGridEntry.cs
- SafeArrayRankMismatchException.cs
- LogStore.cs
- ByteStream.cs
- Calendar.cs
- ActivityDefaults.cs
- BinaryCommonClasses.cs
- NamespaceMapping.cs
- sqlpipe.cs
- ToolStripDropDownMenu.cs
- MessageDesigner.cs
- DecimalConverter.cs
- ActivityCodeDomSerializer.cs
- ProxySimple.cs
- TypeLoadException.cs
- NativeBuffer.cs
- DictionaryTraceRecord.cs
- EasingQuaternionKeyFrame.cs
- TemplatedMailWebEventProvider.cs
- ResourceCategoryAttribute.cs
- CookieParameter.cs
- ColumnResizeUndoUnit.cs
- RegexFCD.cs
- FilterQueryOptionExpression.cs
- XamlReaderConstants.cs
- CodePageUtils.cs
- FrameworkContentElement.cs
- SecurityException.cs
- recordstate.cs
- CacheSection.cs
- ContextMenu.cs
- SchemaImporterExtensionElement.cs
- NonVisualControlAttribute.cs
- DataGridViewSelectedRowCollection.cs
- Header.cs
- AlternationConverter.cs
- BinaryObjectReader.cs
- FocusWithinProperty.cs
- DeclaredTypeElementCollection.cs
- HttpListenerRequestUriBuilder.cs
- TextSyndicationContentKindHelper.cs
- Utils.cs
- TextSpanModifier.cs
- TabPanel.cs
- StreamGeometry.cs
- HostingEnvironmentSection.cs
- Matrix.cs
- FindCompletedEventArgs.cs
- Scripts.cs
- NameValueCollection.cs
- XPathNavigator.cs
- UnknownBitmapDecoder.cs
- WebPartExportVerb.cs
- StrokeNodeOperations2.cs
- SpeechRecognizer.cs
- Missing.cs
- MergeLocalizationDirectives.cs
- RemotingServices.cs
- Point4DValueSerializer.cs
- ImageDrawing.cs
- EnumerableRowCollection.cs
- PointCollection.cs
- MsmqBindingElementBase.cs
- SettingsBindableAttribute.cs
- IndexedDataBuffer.cs
- XmlSchemaObjectTable.cs
- ListViewDesigner.cs
- Triplet.cs
- WebPartConnectionsCloseVerb.cs
- Hex.cs
- Imaging.cs
- xamlnodes.cs
- ToolStripOverflowButton.cs
- DataObject.cs
- ClientRolePrincipal.cs
- Visual3DCollection.cs
- PrintDialog.cs
- ReadOnlyDataSourceView.cs
- DataTemplate.cs
- SchemaTypeEmitter.cs
- AppDomainFactory.cs
- SqlException.cs
- HyperLink.cs
- XmlIlVisitor.cs
- StorageAssociationSetMapping.cs
- Label.cs
- ValueSerializer.cs
- DatePickerAutomationPeer.cs
- TreeViewEvent.cs
- SettingsPropertyCollection.cs
- DefaultIfEmptyQueryOperator.cs
- SourceItem.cs
- Columns.cs
- ThemeableAttribute.cs
- AddressingVersion.cs