Code:
/ FX-1434 / FX-1434 / 1.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
- CqlLexer.cs
- OleDbPermission.cs
- AnnotationService.cs
- DataGridColumnCollection.cs
- JournalNavigationScope.cs
- InstallHelper.cs
- ChtmlPhoneCallAdapter.cs
- EncryptedKey.cs
- DetailsView.cs
- ClaimComparer.cs
- Int64.cs
- ManagementEventArgs.cs
- ZipPackagePart.cs
- ScriptingSectionGroup.cs
- Facet.cs
- Vector3DKeyFrameCollection.cs
- DataSourceCacheDurationConverter.cs
- TableStyle.cs
- DesignerWithHeader.cs
- MethodRental.cs
- DocumentSchemaValidator.cs
- WeakReferenceKey.cs
- Repeater.cs
- ApplySecurityAndSendAsyncResult.cs
- ConversionContext.cs
- AttributeEmitter.cs
- DataGridLinkButton.cs
- GridViewRow.cs
- Exceptions.cs
- Point.cs
- Int64Converter.cs
- Subtree.cs
- Source.cs
- DirectionalAction.cs
- ZipFileInfo.cs
- HtmlToClrEventProxy.cs
- SecureConversationSecurityTokenParameters.cs
- SystemDiagnosticsSection.cs
- ScrollItemPattern.cs
- TransactionalPackage.cs
- EditorBrowsableAttribute.cs
- VisualTarget.cs
- UserValidatedEventArgs.cs
- dsa.cs
- PrintControllerWithStatusDialog.cs
- HMACSHA256.cs
- Rectangle.cs
- NamespaceCollection.cs
- CultureSpecificStringDictionary.cs
- IndexerNameAttribute.cs
- DescendentsWalker.cs
- EdmConstants.cs
- TextChange.cs
- LockCookie.cs
- ContainerSelectorGlyph.cs
- Attributes.cs
- DynamicQueryableWrapper.cs
- GridItemPatternIdentifiers.cs
- PageVisual.cs
- SpotLight.cs
- RecipientInfo.cs
- mediaclock.cs
- oledbmetadatacolumnnames.cs
- TextEditorLists.cs
- PriorityQueue.cs
- Vector3DKeyFrameCollection.cs
- UnsafeNativeMethods.cs
- SiteMapNode.cs
- COM2PictureConverter.cs
- UnsafeNativeMethods.cs
- FormsAuthenticationConfiguration.cs
- DataGridHeaderBorder.cs
- Matrix.cs
- SmtpFailedRecipientsException.cs
- ImageDesigner.cs
- SoapFormatterSinks.cs
- CodeDirectoryCompiler.cs
- SineEase.cs
- ChannelBinding.cs
- RolePrincipal.cs
- AspNetCacheProfileAttribute.cs
- DataGridViewRowsAddedEventArgs.cs
- EventItfInfo.cs
- DoWorkEventArgs.cs
- RSAPKCS1SignatureFormatter.cs
- OleStrCAMarshaler.cs
- DesignerInterfaces.cs
- RawStylusInputCustomData.cs
- TraceUtility.cs
- IEnumerable.cs
- DateTimePickerDesigner.cs
- Single.cs
- EqualityArray.cs
- NameTable.cs
- SecureStringHasher.cs
- _LoggingObject.cs
- StatusInfoItem.cs
- PerformanceCounterPermission.cs
- FontCacheUtil.cs
- FontFamilyIdentifier.cs