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
- Tag.cs
- SmtpReplyReader.cs
- ScrollEvent.cs
- ControlEvent.cs
- SubqueryRules.cs
- FrameworkPropertyMetadata.cs
- AuthenticationException.cs
- DbConnectionClosed.cs
- MsmqTransportSecurityElement.cs
- PrimitiveSchema.cs
- CompatibleComparer.cs
- ObjectDataSource.cs
- DoubleLink.cs
- UnmanagedMarshal.cs
- SmiGettersStream.cs
- WpfXamlType.cs
- Freezable.cs
- SecurityTokenTypes.cs
- OdbcUtils.cs
- StaticExtension.cs
- GeometryHitTestParameters.cs
- OutputCacheProfileCollection.cs
- Calendar.cs
- ObjectStateEntry.cs
- TextTreeObjectNode.cs
- HierarchicalDataBoundControlAdapter.cs
- DesignerActionItem.cs
- CommentEmitter.cs
- CheckBoxField.cs
- ArraySortHelper.cs
- MenuStrip.cs
- MarkupObject.cs
- QilCloneVisitor.cs
- DataGridHeaderBorder.cs
- BitArray.cs
- SmtpAuthenticationManager.cs
- SqlProvider.cs
- ListViewItem.cs
- OLEDB_Enum.cs
- ImageKeyConverter.cs
- Documentation.cs
- IdentityManager.cs
- SafeNativeMethods.cs
- FacetChecker.cs
- TypographyProperties.cs
- QilStrConcat.cs
- MoveSizeWinEventHandler.cs
- TripleDESCryptoServiceProvider.cs
- DataReaderContainer.cs
- FormViewPageEventArgs.cs
- DataViewListener.cs
- SecurityResources.cs
- CaseInsensitiveHashCodeProvider.cs
- ToolboxItem.cs
- Codec.cs
- DiscoveryDocumentSerializer.cs
- TrackBarRenderer.cs
- Table.cs
- XmlUTF8TextWriter.cs
- UshortList2.cs
- UriParserTemplates.cs
- HttpRequestBase.cs
- TableRowCollection.cs
- OdbcCommand.cs
- ReflectPropertyDescriptor.cs
- BufferModesCollection.cs
- entitydatasourceentitysetnameconverter.cs
- SQLDouble.cs
- EncoderReplacementFallback.cs
- TreeNode.cs
- EntitySqlQueryCacheEntry.cs
- VisualStyleRenderer.cs
- SecurityPolicySection.cs
- TypeValidationEventArgs.cs
- TagPrefixAttribute.cs
- TabItem.cs
- ButtonBaseAutomationPeer.cs
- ErasingStroke.cs
- storepermission.cs
- RootBrowserWindow.cs
- LocalizationParserHooks.cs
- _NativeSSPI.cs
- RotationValidation.cs
- Polyline.cs
- EmptyEnumerator.cs
- TypeExtension.cs
- ValidatingPropertiesEventArgs.cs
- IndexingContentUnit.cs
- InteropDesigner.xaml.cs
- SQLDateTime.cs
- SystemWebCachingSectionGroup.cs
- Bitmap.cs
- BasicExpressionVisitor.cs
- ThreadExceptionDialog.cs
- QueryStoreStatusRequest.cs
- GPPOINT.cs
- CacheModeValueSerializer.cs
- RefExpr.cs
- EntityDataSourceView.cs
- MulticastNotSupportedException.cs