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
- CodeAccessPermission.cs
- CookielessHelper.cs
- NodeCounter.cs
- PrinterUnitConvert.cs
- MembershipValidatePasswordEventArgs.cs
- SharedDp.cs
- LinearGradientBrush.cs
- KeyGestureValueSerializer.cs
- TypeElement.cs
- MultipartContentParser.cs
- Aggregates.cs
- GeometryGroup.cs
- XPathAncestorQuery.cs
- EdmToObjectNamespaceMap.cs
- PropertyGridEditorPart.cs
- UnsafeNativeMethodsPenimc.cs
- UniqueConstraint.cs
- SQLGuid.cs
- Activity.cs
- GreenMethods.cs
- SerialErrors.cs
- BitmapPalettes.cs
- ArcSegment.cs
- LocalizationParserHooks.cs
- DbConnectionPoolCounters.cs
- TableItemStyle.cs
- ArgumentNullException.cs
- AssemblyCache.cs
- Size3DConverter.cs
- LocalizableResourceBuilder.cs
- PolicyException.cs
- StorageInfo.cs
- StylusOverProperty.cs
- GlobalEventManager.cs
- DesignTableCollection.cs
- SafeHandles.cs
- XmlNamespaceDeclarationsAttribute.cs
- StylusCaptureWithinProperty.cs
- Types.cs
- HandlerBase.cs
- UnmanagedHandle.cs
- Page.cs
- ReadOnlyHierarchicalDataSourceView.cs
- WebBaseEventKeyComparer.cs
- GridViewDeletedEventArgs.cs
- InternalUserCancelledException.cs
- DispatchChannelSink.cs
- _FtpControlStream.cs
- TableDetailsRow.cs
- MsmqInputSessionChannelListener.cs
- WaitHandle.cs
- ConditionalAttribute.cs
- TraceUtility.cs
- ComContractElementCollection.cs
- Point3DKeyFrameCollection.cs
- DataColumnMapping.cs
- AppSettingsExpressionBuilder.cs
- Boolean.cs
- HttpAsyncResult.cs
- SqlGenericUtil.cs
- DragEventArgs.cs
- LogEntryHeaderSerializer.cs
- StylusButton.cs
- RegisteredArrayDeclaration.cs
- SpecularMaterial.cs
- TemplateColumn.cs
- ErrorWrapper.cs
- HttpCapabilitiesBase.cs
- AtomParser.cs
- CustomErrorsSection.cs
- TableRow.cs
- VisualBrush.cs
- QilExpression.cs
- TextEditorTyping.cs
- OpenTypeLayoutCache.cs
- MethodBuilderInstantiation.cs
- ScaleTransform3D.cs
- ToolStripTextBox.cs
- SchemaHelper.cs
- BackgroundFormatInfo.cs
- SetMemberBinder.cs
- GridItemCollection.cs
- ActivationArguments.cs
- PreloadedPackages.cs
- CompatibleIComparer.cs
- SettingsPropertyValue.cs
- InstanceNameConverter.cs
- DependencyObject.cs
- EditorZoneBase.cs
- LongValidatorAttribute.cs
- XmlLinkedNode.cs
- TextSchema.cs
- FixedTextPointer.cs
- RolePrincipal.cs
- filewebrequest.cs
- DataSourceSelectArguments.cs
- ServiceAuthorizationElement.cs
- HwndSourceKeyboardInputSite.cs
- PerformanceCounter.cs
- SecurityUtils.cs