Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / CodeDOM / CodeTryCatchFinallyStatement.cs / 1 / CodeTryCatchFinallyStatement.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
///
/// Represents a try block, with any number of catch clauses and an
/// optionally finally block.
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeTryCatchFinallyStatement : CodeStatement {
private CodeStatementCollection tryStatments = new CodeStatementCollection();
private CodeStatementCollection finallyStatments = new CodeStatementCollection();
private CodeCatchClauseCollection catchClauses = new CodeCatchClauseCollection();
///
///
/// Initializes a new instance of .
///
///
public CodeTryCatchFinallyStatement() {
}
///
///
/// Initializes a new instance of using the specified statements to try and catch
/// clauses.
///
///
public CodeTryCatchFinallyStatement(CodeStatement[] tryStatements, CodeCatchClause[] catchClauses) {
TryStatements.AddRange(tryStatements);
CatchClauses.AddRange(catchClauses);
}
///
///
/// Initializes a new instance of using the specified statements to
/// try, catch clauses, and finally statements.
///
///
public CodeTryCatchFinallyStatement(CodeStatement[] tryStatements, CodeCatchClause[] catchClauses, CodeStatement[] finallyStatements) {
TryStatements.AddRange(tryStatements);
CatchClauses.AddRange(catchClauses);
FinallyStatements.AddRange(finallyStatements);
}
///
///
/// Gets or sets
/// the try statements to try.
///
///
public CodeStatementCollection TryStatements {
get {
return tryStatments;
}
}
///
///
/// Gets or sets the catch clauses to use.
///
///
public CodeCatchClauseCollection CatchClauses {
get {
return catchClauses;
}
}
///
///
/// Gets or sets
/// the finally statements to use.
///
///
public CodeStatementCollection FinallyStatements {
get {
return finallyStatments;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridCell.cs
- typedescriptorpermission.cs
- PersonalizablePropertyEntry.cs
- WebPageTraceListener.cs
- BasePattern.cs
- CommandEventArgs.cs
- ProfileService.cs
- AssemblyAssociatedContentFileAttribute.cs
- MouseEvent.cs
- SuppressIldasmAttribute.cs
- DataKeyCollection.cs
- Matrix3D.cs
- BufferedReadStream.cs
- StylusPlugin.cs
- RuleSetDialog.cs
- ViewManagerAttribute.cs
- ContentPlaceHolderDesigner.cs
- KnownTypesProvider.cs
- NumericUpDown.cs
- StringDictionary.cs
- ProviderBase.cs
- FileCodeGroup.cs
- SslStreamSecurityElement.cs
- DockPattern.cs
- URLAttribute.cs
- SignatureHelper.cs
- StringCollectionMarkupSerializer.cs
- FontEmbeddingManager.cs
- XmlSchemaDocumentation.cs
- ConnectionManagementSection.cs
- GorillaCodec.cs
- CommunicationObject.cs
- ToolStripRenderer.cs
- CodeDomLocalizationProvider.cs
- DoubleUtil.cs
- AtomParser.cs
- HandlerFactoryCache.cs
- UnknownBitmapEncoder.cs
- BindingValueChangedEventArgs.cs
- BinaryWriter.cs
- CodeAccessSecurityEngine.cs
- QuaternionValueSerializer.cs
- Visual3DCollection.cs
- WorkflowWebHostingModule.cs
- ValueQuery.cs
- TcpServerChannel.cs
- XmlSignatureProperties.cs
- DbMetaDataCollectionNames.cs
- MulticastOption.cs
- ServiceHostFactory.cs
- ReachSerializer.cs
- StylusButton.cs
- EventEntry.cs
- RequestCachePolicyConverter.cs
- BufferedStream.cs
- LocalFileSettingsProvider.cs
- MetadataArtifactLoader.cs
- ToolStripItemImageRenderEventArgs.cs
- DataBindingCollection.cs
- HandlerWithFactory.cs
- CodeCommentStatement.cs
- OleCmdHelper.cs
- SqlTypeSystemProvider.cs
- Ops.cs
- ArgumentNullException.cs
- QilValidationVisitor.cs
- Object.cs
- ButtonBaseAdapter.cs
- UrlAuthFailureHandler.cs
- CodeSnippetCompileUnit.cs
- DivideByZeroException.cs
- CqlParser.cs
- TreeViewHitTestInfo.cs
- SelectingProviderEventArgs.cs
- MasterPageCodeDomTreeGenerator.cs
- DrawingAttributes.cs
- ContextProperty.cs
- XslUrlEditor.cs
- Message.cs
- IdentityReference.cs
- ProtectedConfigurationProviderCollection.cs
- WebPartZoneBase.cs
- GridViewColumnCollection.cs
- InvalidDataException.cs
- _HeaderInfoTable.cs
- ObjectDataSourceStatusEventArgs.cs
- OleAutBinder.cs
- IMembershipProvider.cs
- FlowThrottle.cs
- DefaultPropertyAttribute.cs
- XmlDataSourceNodeDescriptor.cs
- Walker.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- AssertFilter.cs
- InputGestureCollection.cs
- MouseOverProperty.cs
- LayoutEngine.cs
- LocatorPartList.cs
- WebPartManager.cs
- WindowsButton.cs