Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Threading / ThreadAbortException.cs / 1 / ThreadAbortException.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: ThreadAbortException
**
**
** Purpose: An exception class which is thrown into a thread to cause it to
** abort. This is a special non-catchable exception and results in
** the thread's death. This is thrown by the VM only and can NOT be
** thrown by any user thread, and subclassing this is useless.
**
**
=============================================================================*/
namespace System.Threading
{
using System;
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable()] public sealed class ThreadAbortException : SystemException
{
private ThreadAbortException()
: base(GetMessageFromNativeResources(ExceptionMessageKind.ThreadAbort))
{
SetErrorCode(__HResults.COR_E_THREADABORTED);
}
//required for serialization
internal ThreadAbortException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
public Object ExceptionState
{
get {return Thread.CurrentThread.AbortReason;}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: ThreadAbortException
**
**
** Purpose: An exception class which is thrown into a thread to cause it to
** abort. This is a special non-catchable exception and results in
** the thread's death. This is thrown by the VM only and can NOT be
** thrown by any user thread, and subclassing this is useless.
**
**
=============================================================================*/
namespace System.Threading
{
using System;
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable()] public sealed class ThreadAbortException : SystemException
{
private ThreadAbortException()
: base(GetMessageFromNativeResources(ExceptionMessageKind.ThreadAbort))
{
SetErrorCode(__HResults.COR_E_THREADABORTED);
}
//required for serialization
internal ThreadAbortException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
public Object ExceptionState
{
get {return Thread.CurrentThread.AbortReason;}
}
}
}
// 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
- Buffer.cs
- OdbcException.cs
- SettingsSavedEventArgs.cs
- XmlSerializableReader.cs
- HtmlInputImage.cs
- ToolboxComponentsCreatingEventArgs.cs
- ComplusTypeValidator.cs
- DateTimeOffset.cs
- ListViewGroupConverter.cs
- SqlIdentifier.cs
- SortedDictionary.cs
- AuthenticationSection.cs
- cookiecollection.cs
- EventHandlerList.cs
- SafeNativeMethods.cs
- wgx_exports.cs
- GenerateDerivedKeyRequest.cs
- IncrementalReadDecoders.cs
- Trigger.cs
- Unit.cs
- DataGridItemCollection.cs
- Util.cs
- TrustLevelCollection.cs
- TaskFactory.cs
- GenerateHelper.cs
- TextSegment.cs
- ExplicitDiscriminatorMap.cs
- XmlSchemaAny.cs
- TypeConverterAttribute.cs
- AttributeQuery.cs
- SqlConnectionManager.cs
- XmlSchemaAttribute.cs
- FileDialog.cs
- StatusBarItem.cs
- ToolboxSnapDragDropEventArgs.cs
- HandledMouseEvent.cs
- ExpressionBuilder.cs
- InputLanguageEventArgs.cs
- AddInStore.cs
- Type.cs
- Lease.cs
- RootCodeDomSerializer.cs
- DebuggerAttributes.cs
- BatchStream.cs
- CodeMethodInvokeExpression.cs
- UserControlBuildProvider.cs
- DeferrableContent.cs
- GetLedgerEntryForRecipientRequest.cs
- MailWriter.cs
- FontWeights.cs
- FontInfo.cs
- DateTimeValueSerializer.cs
- ToolTip.cs
- FreeFormDesigner.cs
- HttpWebRequest.cs
- SafeArrayRankMismatchException.cs
- ManifestSignatureInformation.cs
- TraceListeners.cs
- SelectionWordBreaker.cs
- IndentedWriter.cs
- XsdValidatingReader.cs
- DesignerActionUI.cs
- FontSource.cs
- PageAsyncTask.cs
- TemplateGroupCollection.cs
- EntityViewContainer.cs
- TrailingSpaceComparer.cs
- ExpandedWrapper.cs
- BaseParagraph.cs
- ModelProperty.cs
- SurrogateEncoder.cs
- InvalidWMPVersionException.cs
- DataGridLength.cs
- CustomError.cs
- FileBasedResourceGroveler.cs
- XDRSchema.cs
- AppDomainFactory.cs
- DispatcherProcessingDisabled.cs
- ExcludePathInfo.cs
- ReadOnlyHierarchicalDataSourceView.cs
- TextParagraphCache.cs
- EntityDataReader.cs
- Directory.cs
- Contracts.cs
- DetailsViewRowCollection.cs
- SQLDecimalStorage.cs
- SamlSecurityTokenAuthenticator.cs
- DataGridViewRowPostPaintEventArgs.cs
- Brushes.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- PointCollection.cs
- EllipseGeometry.cs
- XmlSchemaAttributeGroupRef.cs
- log.cs
- DataGrid.cs
- LinqDataSourceSelectEventArgs.cs
- UserControl.cs
- ZoneMembershipCondition.cs
- KernelTypeValidation.cs
- XsdDuration.cs