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
- Point4D.cs
- x509store.cs
- HttpResponseHeader.cs
- TraceFilter.cs
- DataRowChangeEvent.cs
- XamlContextStack.cs
- DataBoundLiteralControl.cs
- ObjectStateEntryDbDataRecord.cs
- ColorMap.cs
- StylusOverProperty.cs
- JournalEntry.cs
- codemethodreferenceexpression.cs
- ToolStripMenuItem.cs
- HitTestParameters3D.cs
- TrackingMemoryStreamFactory.cs
- CallSite.cs
- PropertyBuilder.cs
- Thumb.cs
- DataSourceSelectArguments.cs
- RequestCachePolicyConverter.cs
- QuaternionAnimationBase.cs
- DataShape.cs
- DbFunctionCommandTree.cs
- DrawingVisual.cs
- WebServicesInteroperability.cs
- WebPartEditorCancelVerb.cs
- MethodBody.cs
- Light.cs
- DetailsViewDeletedEventArgs.cs
- PermissionRequestEvidence.cs
- ImageConverter.cs
- ImageAnimator.cs
- SmiRecordBuffer.cs
- Root.cs
- Context.cs
- ExtendedTransformFactory.cs
- Drawing.cs
- NameScopePropertyAttribute.cs
- StrokeNode.cs
- FileAuthorizationModule.cs
- SoapIncludeAttribute.cs
- MdiWindowListStrip.cs
- EditorBrowsableAttribute.cs
- TypographyProperties.cs
- DocumentPageTextView.cs
- ToolStripGripRenderEventArgs.cs
- SoapIgnoreAttribute.cs
- FeatureSupport.cs
- RequestChannel.cs
- ConfigurationException.cs
- ZipIOModeEnforcingStream.cs
- _IPv4Address.cs
- RectConverter.cs
- SeekableReadStream.cs
- ExceptionValidationRule.cs
- InheritablePropertyChangeInfo.cs
- WindowsSolidBrush.cs
- GenerateScriptTypeAttribute.cs
- BitmapEffectCollection.cs
- CookielessHelper.cs
- CapabilitiesRule.cs
- DirectionalLight.cs
- StreamUpgradeInitiator.cs
- UserNamePasswordValidator.cs
- SmtpNegotiateAuthenticationModule.cs
- StatusBar.cs
- PropertyPathConverter.cs
- TreeNodeStyle.cs
- SymbolType.cs
- ReadOnlyTernaryTree.cs
- PointAnimationBase.cs
- SystemIPInterfaceStatistics.cs
- ServiceConfigurationTraceRecord.cs
- CroppedBitmap.cs
- WorkflowStateRollbackService.cs
- ButtonAutomationPeer.cs
- DataKey.cs
- ListItemDetailViewAttribute.cs
- DataSourceControlBuilder.cs
- StylusPointPropertyUnit.cs
- CodeFieldReferenceExpression.cs
- EventLogPermissionAttribute.cs
- UncommonField.cs
- MessageSecurityException.cs
- PrimitiveCodeDomSerializer.cs
- PolyBezierSegment.cs
- BitmapEffectState.cs
- ProcessHostMapPath.cs
- ScrollProperties.cs
- ThemeableAttribute.cs
- HtmlMeta.cs
- ByeMessageApril2005.cs
- ParameterInfo.cs
- MailMessageEventArgs.cs
- Point3DAnimationUsingKeyFrames.cs
- XPathQilFactory.cs
- XmlDocumentSchema.cs
- CodeAttachEventStatement.cs
- EventManager.cs
- BrushValueSerializer.cs