Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- QilCloneVisitor.cs
- TreeViewEvent.cs
- ExpressionBuilderContext.cs
- XmlText.cs
- AssemblySettingAttributes.cs
- FlowLayoutSettings.cs
- BlockExpression.cs
- XmlIncludeAttribute.cs
- LiteralTextContainerControlBuilder.cs
- AspNetCacheProfileAttribute.cs
- InitializationEventAttribute.cs
- KeyEventArgs.cs
- AttributedMetaModel.cs
- ShaperBuffers.cs
- RadioButtonStandardAdapter.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- SoapAttributeOverrides.cs
- LinkArea.cs
- SspiHelper.cs
- DataBinding.cs
- AesCryptoServiceProvider.cs
- CheckPair.cs
- HttpHeaderCollection.cs
- BitmapDecoder.cs
- SplitterPanelDesigner.cs
- TextSelection.cs
- XMLSchema.cs
- EntitySetBaseCollection.cs
- dataobject.cs
- localization.cs
- AttributeEmitter.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- Internal.cs
- ContentFilePart.cs
- VisualStyleTypesAndProperties.cs
- RpcCryptoRequest.cs
- LineBreakRecord.cs
- DrawingGroupDrawingContext.cs
- MetadataUtilsSmi.cs
- ContextItemManager.cs
- PrintControllerWithStatusDialog.cs
- FunctionDetailsReader.cs
- ObfuscateAssemblyAttribute.cs
- RegistrationServices.cs
- MetadataProperty.cs
- SQLGuidStorage.cs
- TableColumn.cs
- XamlSerializerUtil.cs
- DetailsView.cs
- CodeSpit.cs
- Mutex.cs
- DateTimeOffsetStorage.cs
- Privilege.cs
- SystemThemeKey.cs
- URL.cs
- CacheOutputQuery.cs
- ClientRuntimeConfig.cs
- RequestResizeEvent.cs
- SystemDropShadowChrome.cs
- ReadOnlyDictionary.cs
- SchemaCollectionCompiler.cs
- XsltLoader.cs
- QilStrConcatenator.cs
- InternalDispatchObject.cs
- RtType.cs
- WebConfigurationHostFileChange.cs
- FileSecurity.cs
- PropertyConverter.cs
- AssertUtility.cs
- HandleCollector.cs
- CodeMethodInvokeExpression.cs
- CodeAssignStatement.cs
- Point3DAnimation.cs
- ExportException.cs
- StoreItemCollection.Loader.cs
- RemoteWebConfigurationHostServer.cs
- EntityDesignerBuildProvider.cs
- XmlFormatExtensionPrefixAttribute.cs
- X509Extension.cs
- CheckedPointers.cs
- Message.cs
- CurrentChangingEventArgs.cs
- HostedImpersonationContext.cs
- SubMenuStyleCollection.cs
- ColorConverter.cs
- WindowsListViewSubItem.cs
- StorageEntitySetMapping.cs
- DataGridViewColumnDesigner.cs
- NavigateEvent.cs
- AudioFormatConverter.cs
- SqlDataReader.cs
- Buffer.cs
- ContentElement.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- Point3DCollectionConverter.cs
- HttpResponseWrapper.cs
- GrammarBuilderPhrase.cs
- HttpBrowserCapabilitiesBase.cs
- RelationalExpressions.cs
- RichTextBox.cs