Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / NotFiniteNumberException.cs / 1 / NotFiniteNumberException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System { using System; using System.Runtime.Serialization; using System.Security.Permissions; [System.Runtime.InteropServices.ComVisible(true)] [Serializable()] public class NotFiniteNumberException : ArithmeticException { private double _offendingNumber; public NotFiniteNumberException() : base(Environment.GetResourceString("Arg_NotFiniteNumberException")) { _offendingNumber = 0; SetErrorCode(__HResults.COR_E_NOTFINITENUMBER); } public NotFiniteNumberException(double offendingNumber) : base() { _offendingNumber = offendingNumber; SetErrorCode(__HResults.COR_E_NOTFINITENUMBER); } public NotFiniteNumberException(String message) : base(message) { _offendingNumber = 0; SetErrorCode(__HResults.COR_E_NOTFINITENUMBER); } public NotFiniteNumberException(String message, double offendingNumber) : base(message) { _offendingNumber = offendingNumber; SetErrorCode(__HResults.COR_E_NOTFINITENUMBER); } public NotFiniteNumberException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_NOTFINITENUMBER); } public NotFiniteNumberException(String message, double offendingNumber, Exception innerException) : base(message, innerException) { _offendingNumber = offendingNumber; SetErrorCode(__HResults.COR_E_NOTFINITENUMBER); } protected NotFiniteNumberException(SerializationInfo info, StreamingContext context) : base(info, context) { _offendingNumber = info.GetInt32("OffendingNumber"); } public double OffendingNumber { get { return _offendingNumber; } } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } base.GetObjectData(info, context); info.AddValue("OffendingNumber", _offendingNumber, typeof(Int32)); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataMisalignedException.cs
- ObjectStateEntryDbDataRecord.cs
- GridItemPatternIdentifiers.cs
- TypeSystemHelpers.cs
- SQLMembershipProvider.cs
- IisHelper.cs
- WriteableBitmap.cs
- DelegatingTypeDescriptionProvider.cs
- XmlPropertyBag.cs
- AppSettingsExpressionBuilder.cs
- IgnoreFlushAndCloseStream.cs
- ComponentCollection.cs
- TextEditorSelection.cs
- SecurityTimestamp.cs
- _OverlappedAsyncResult.cs
- TeredoHelper.cs
- CharacterBufferReference.cs
- SchemaElementDecl.cs
- MessageEventSubscriptionService.cs
- ControlBuilderAttribute.cs
- ContainerUtilities.cs
- FormatVersion.cs
- XNodeValidator.cs
- EditCommandColumn.cs
- MediaContextNotificationWindow.cs
- CodeCatchClauseCollection.cs
- SqlDependencyListener.cs
- KeyEvent.cs
- ManifestSignedXml.cs
- IntegerValidatorAttribute.cs
- SessionStateModule.cs
- MenuItemStyleCollection.cs
- CancellationHandler.cs
- ColorTransformHelper.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- BoundingRectTracker.cs
- TypeConstant.cs
- TemplateModeChangedEventArgs.cs
- _AutoWebProxyScriptEngine.cs
- AbandonedMutexException.cs
- XmlUtf8RawTextWriter.cs
- PointAnimationClockResource.cs
- MouseBinding.cs
- GrammarBuilderWildcard.cs
- MemberRelationshipService.cs
- UrlMappingsSection.cs
- EventWaitHandleSecurity.cs
- VisualStyleElement.cs
- DoubleLinkListEnumerator.cs
- RelationshipConverter.cs
- GACIdentityPermission.cs
- RuntimeHelpers.cs
- XMLDiffLoader.cs
- AttachInfo.cs
- AttributeExtensions.cs
- BamlRecordHelper.cs
- BaseDataBoundControl.cs
- CreateParams.cs
- DateTimeFormatInfo.cs
- TaskHelper.cs
- ListChangedEventArgs.cs
- ObjectTokenCategory.cs
- OutKeywords.cs
- PositiveTimeSpanValidatorAttribute.cs
- GZipDecoder.cs
- EndCreateSecurityTokenRequest.cs
- PerformanceCounter.cs
- IgnoreFlushAndCloseStream.cs
- SubclassTypeValidator.cs
- NamedPipeAppDomainProtocolHandler.cs
- ToolStripPanelSelectionBehavior.cs
- NetCodeGroup.cs
- FormattedText.cs
- ProcessModelInfo.cs
- UnorderedHashRepartitionStream.cs
- ImpersonationContext.cs
- RegionInfo.cs
- LinqToSqlWrapper.cs
- XmlAnyElementAttributes.cs
- ServiceDescriptionData.cs
- ErrorWrapper.cs
- MatcherBuilder.cs
- PublisherIdentityPermission.cs
- XamlReaderHelper.cs
- RestClientProxyHandler.cs
- ComPersistableTypeElementCollection.cs
- XamlTemplateSerializer.cs
- SqlDuplicator.cs
- MenuItemStyle.cs
- Parser.cs
- RijndaelManaged.cs
- SqlDataSourceWizardForm.cs
- ToolStripManager.cs
- DataGridViewRowsAddedEventArgs.cs
- ScriptManager.cs
- TextEncodedRawTextWriter.cs
- PageAsyncTaskManager.cs
- AsmxEndpointPickerExtension.cs
- EdgeProfileValidation.cs
- Signature.cs