SyntaxFactory.TryBlock 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
TryBlock(TryStatementSyntax, SyntaxList<StatementSyntax>, SyntaxList<CatchBlockSyntax>, FinallyBlockSyntax, EndBlockStatementSyntax) |
表示“试用...抓住。。。最后。。。结束试用“块。 |
TryBlock() |
表示“试用...抓住。。。最后。。。结束试用“块。 |
TryBlock(SyntaxList<StatementSyntax>, SyntaxList<CatchBlockSyntax>, FinallyBlockSyntax) |
表示“试用...抓住。。。最后。。。结束试用“块。 |
TryBlock(TryStatementSyntax, SyntaxList<StatementSyntax>, SyntaxList<CatchBlockSyntax>, FinallyBlockSyntax, EndBlockStatementSyntax)
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
表示“试用...抓住。。。最后。。。结束试用“块。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::TryBlockSyntax ^ TryBlock(Microsoft::CodeAnalysis::VisualBasic::Syntax::TryStatementSyntax ^ tryStatement, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::StatementSyntax ^> statements, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::CatchBlockSyntax ^> catchBlocks, Microsoft::CodeAnalysis::VisualBasic::Syntax::FinallyBlockSyntax ^ finallyBlock, Microsoft::CodeAnalysis::VisualBasic::Syntax::EndBlockStatementSyntax ^ endTryStatement);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.TryBlockSyntax TryBlock (Microsoft.CodeAnalysis.VisualBasic.Syntax.TryStatementSyntax tryStatement, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> statements, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.CatchBlockSyntax> catchBlocks, Microsoft.CodeAnalysis.VisualBasic.Syntax.FinallyBlockSyntax finallyBlock, Microsoft.CodeAnalysis.VisualBasic.Syntax.EndBlockStatementSyntax endTryStatement);
static member TryBlock : Microsoft.CodeAnalysis.VisualBasic.Syntax.TryStatementSyntax * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.CatchBlockSyntax> * Microsoft.CodeAnalysis.VisualBasic.Syntax.FinallyBlockSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.EndBlockStatementSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.TryBlockSyntax
Public Shared Function TryBlock (tryStatement As TryStatementSyntax, statements As SyntaxList(Of StatementSyntax), catchBlocks As SyntaxList(Of CatchBlockSyntax), finallyBlock As FinallyBlockSyntax, endTryStatement As EndBlockStatementSyntax) As TryBlockSyntax
参数
- tryStatement
- TryStatementSyntax
开始“Try”块的“Try”语句。
- statements
- SyntaxList<StatementSyntax>
要执行的语句列表。
- catchBlocks
- SyntaxList<CatchBlockSyntax>
在“Try”块中执行语句时引发异常时,可能会执行“Catch”块的列表。
- finallyBlock
- FinallyBlockSyntax
在执行之前要执行的“Finally”块离开“Try”块。
- endTryStatement
- EndBlockStatementSyntax
“End Try”语句。
返回
适用于
TryBlock()
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
表示“试用...抓住。。。最后。。。结束试用“块。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::TryBlockSyntax ^ TryBlock();
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.TryBlockSyntax TryBlock ();
static member TryBlock : unit -> Microsoft.CodeAnalysis.VisualBasic.Syntax.TryBlockSyntax
Public Shared Function TryBlock () As TryBlockSyntax
返回
适用于
TryBlock(SyntaxList<StatementSyntax>, SyntaxList<CatchBlockSyntax>, FinallyBlockSyntax)
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
表示“试用...抓住。。。最后。。。结束试用“块。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::TryBlockSyntax ^ TryBlock(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::StatementSyntax ^> statements, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::CatchBlockSyntax ^> catchBlocks, Microsoft::CodeAnalysis::VisualBasic::Syntax::FinallyBlockSyntax ^ finallyBlock);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.TryBlockSyntax TryBlock (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> statements, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.CatchBlockSyntax> catchBlocks, Microsoft.CodeAnalysis.VisualBasic.Syntax.FinallyBlockSyntax finallyBlock);
static member TryBlock : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.CatchBlockSyntax> * Microsoft.CodeAnalysis.VisualBasic.Syntax.FinallyBlockSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.TryBlockSyntax
Public Shared Function TryBlock (statements As SyntaxList(Of StatementSyntax), catchBlocks As SyntaxList(Of CatchBlockSyntax), finallyBlock As FinallyBlockSyntax) As TryBlockSyntax
参数
- statements
- SyntaxList<StatementSyntax>
要执行的语句列表。
- catchBlocks
- SyntaxList<CatchBlockSyntax>
在“Try”块中执行语句时引发异常时,可能会执行“Catch”块的列表。
- finallyBlock
- FinallyBlockSyntax
在执行之前要执行的“Finally”块离开“Try”块。