Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / InvalidEnumArgumentException.cs / 1305376 / 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
- RotateTransform3D.cs
- RegistryExceptionHelper.cs
- DomainConstraint.cs
- RegexTree.cs
- UnionCodeGroup.cs
- DataGridTextBoxColumn.cs
- DesignTimeVisibleAttribute.cs
- DataService.cs
- PageSettings.cs
- ScriptReferenceBase.cs
- PreservationFileReader.cs
- EntityDescriptor.cs
- WindowsButton.cs
- FeatureSupport.cs
- AspNetPartialTrustHelpers.cs
- ExtendedPropertiesHandler.cs
- DiscoveryReference.cs
- DifferencingCollection.cs
- NetCodeGroup.cs
- SqlVersion.cs
- LinqDataSource.cs
- WizardForm.cs
- OleDbInfoMessageEvent.cs
- DataGridViewButtonCell.cs
- SchemaExporter.cs
- _TransmitFileOverlappedAsyncResult.cs
- SmtpNetworkElement.cs
- NameValuePermission.cs
- FolderBrowserDialog.cs
- ToolStripLabel.cs
- HMACMD5.cs
- NumberAction.cs
- StorageFunctionMapping.cs
- XmlValidatingReaderImpl.cs
- SafeFileMappingHandle.cs
- SynchronousChannel.cs
- EdmComplexTypeAttribute.cs
- HandlerWithFactory.cs
- InstanceNotFoundException.cs
- Message.cs
- RuntimeHelpers.cs
- DataReaderContainer.cs
- _SslStream.cs
- DataGridLinkButton.cs
- InputScopeManager.cs
- Evaluator.cs
- TimeSpanParse.cs
- FixedSOMGroup.cs
- SmiXetterAccessMap.cs
- XmlSchemaAttribute.cs
- DocumentViewer.cs
- ConfigurationSectionGroup.cs
- EntityContainer.cs
- ErrorFormatter.cs
- TreeBuilderBamlTranslator.cs
- LineServicesRun.cs
- UnsafeNativeMethods.cs
- SoapObjectReader.cs
- ProfileService.cs
- FolderBrowserDialog.cs
- CursorConverter.cs
- TableRow.cs
- SafeArrayTypeMismatchException.cs
- CustomAttributeFormatException.cs
- OrderPreservingPipeliningMergeHelper.cs
- KeySpline.cs
- ListDependantCardsRequest.cs
- InvalidAsynchronousStateException.cs
- FormViewCommandEventArgs.cs
- UserControlDesigner.cs
- CompiledQueryCacheEntry.cs
- HtmlWindowCollection.cs
- ObjectDataSource.cs
- Cloud.cs
- PrimitiveSchema.cs
- CmsUtils.cs
- Columns.cs
- SearchForVirtualItemEventArgs.cs
- IResourceProvider.cs
- AdapterUtil.cs
- TabRenderer.cs
- ListControl.cs
- Registry.cs
- ProfileGroupSettingsCollection.cs
- DiscardableAttribute.cs
- ConfigUtil.cs
- HtmlControl.cs
- TriState.cs
- CodeTypeParameter.cs
- CodeNamespace.cs
- PointAnimationUsingPath.cs
- MgmtConfigurationRecord.cs
- TextWriterTraceListener.cs
- RunWorkerCompletedEventArgs.cs
- DrawingServices.cs
- SqlNotificationRequest.cs
- PropertyPath.cs
- PersistenceTypeAttribute.cs
- MergablePropertyAttribute.cs
- AccessedThroughPropertyAttribute.cs