CodeQL library for C#
codeql/csharp-all 3.1.2-dev (changelog, source)
Search

Module Stmt

Provides all statement classes.

All statements have the common base class Stmt.

Import path

import semmle.code.csharp.Stmt

Imports

Element

Provides the Element class, the base class of all C# program elements.

Expr

Provides all expression classes.

Location

Provides the Location class to give a location for each program element.

Member

Provides classes relating to declarations and type members.

Classes

BlockStmt

A block statement, for example

BreakStmt

A break statement, for example line 4 in

CaseStmt

A case statement.

CatchClause

A catch clause within a try statement.

CheckedStmt

A checked statement, for example

ConstCase

A constant case of a switch statement, for example case OpCode.Nop: on line 2 in

ContinueStmt

A continue statement, for example line 4 in

DefaultCase

A default case of a switch statement, for example default: on line 3 in

DoStmt

A do-while statement, for example

EmptyStmt

An empty statement, for example line 2 in

ExceptionClass

A class that derives from System.Exception, and may be thrown as an exception.

ExprStmt

An expression statement, for example M1() on line 5

FixedStmt

A fixed statement, for example lines 3–5 in

ForStmt

A for loop, for example

ForeachStmt

A foreach loop, for example

GeneralCatchClause

A general catch clause that does not specify the exception being caught.

GotoCaseStmt

A goto case statement that jumps to a switch case.

GotoDefaultStmt

A goto default statement that jumps to the default case.

GotoLabelStmt

A goto statement that jumps to a labeled statement, for example line 4 in

GotoStmt

A goto statement.

IfStmt

An if statement, for example

JumpStmt

A statement that changes the control flow and jumps to another statement.

LabelStmt

A label statement, for example line 7 in

LabeledStmt

A labeled statement.

LocalConstantDeclStmt

A local constant declaration statement, for example line 2 in

LocalFunctionStmt

A statement defining a local function. For example, the statement on lines 2–4 in

LocalVariableDeclStmt

A local declaration statement, for example line 2 in

LockStmt

A lock statement, for example

LoopStmt

A loop statement.

ReturnStmt

A return statement, for example line 2 in

SelectionStmt

A conditional statement.

SpecificCatchClause

A catch clause that catches a specific exception.

Stmt

A statement.

SwitchStmt

A switch statement, for example

ThrowStmt

A throw statement, for example line 3 in

TryStmt

A try statement, for example

UncheckedStmt

An unchecked statement, for example

UnsafeStmt

An unsafe statement, for example

UsingBlockStmt

A using block statement, for example

UsingDeclStmt

A using declaration statement, for example

UsingStmt

A using block or declaration. Either a using declaration (UsingDeclStmt) or a using block (UsingBlockStmt).

WhileStmt

A while statement, for example

YieldBreakStmt

A yield break statement, for example line 6 in

YieldReturnStmt

A yield return statement, for example line 4 in

YieldStmt

A yield statement.