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

Module Assignment

Provides all assignment classes.

All assignments have the common base class Assignment.

Import path

import semmle.code.csharp.exprs.Assignment

Imports

Expr

Provides all expression classes.

Classes

AddEventExpr

An event addition, for example line 9 in

AddOrRemoveEventExpr

An event assignment. Either an event addition (AddEventExpr) or an event removal (RemoveEventExpr).

AssignAddExpr

An addition assignment operation, for example x += y.

AssignAndExpr

A bitwise-and assignment operation, for example x &= y.

AssignArithmeticOperation

An arithmetic assignment operation. Either an addition assignment operation (AssignAddExpr), a subtraction assignment operation (AssignSubExpr), a multiplication assignment operation (AssignMulExpr), a division assignment operation (AssignDivExpr), or a remainder assignment operation (AssignRemExpr).

AssignBitwiseOperation

A bitwise assignment operation. Either a bitwise-and assignment operation (AssignAndExpr), a bitwise-or assignment operation (AssignOrExpr), a bitwise exclusive-or assignment operation (AssignXorExpr), a left-shift assignment operation (AssignLeftShiftExpr), or a right-shift assignment operation (AssignRightShiftExpr), or an unsigned right-shift assignment operation (AssignUnsignedRightShiftExpr).

AssignCoalesceExpr

A null-coalescing assignment operation, for example x ??= y.

AssignDivExpr

An division assignment operation, for example x /= y.

AssignExpr

A simple assignment, for example x = 0.

AssignLeftShiftExpr

A left-shift assignment operation, for example x <<= y.

AssignMulExpr

An multiplication assignment operation, for example x *= y.

AssignOperation

An assignment operation. Either an arithmetic assignment operation (AssignArithmeticOperation), a bitwise assignment operation (AssignBitwiseOperation), or an event assignment (AddOrRemoveEventExpr).

AssignOrExpr

A bitwise-or assignment operation, for example x |= y.

AssignRemExpr

A remainder assignment operation, for example x %= y.

AssignRightShiftExpr

A right-shift assignment operation, for example x >>= y.

AssignSubExpr

A subtraction assignment operation, for example x -= y.

AssignUnsighedRightShiftExpr

An unsigned right-shift assignment operation, for example x >>>= y.

AssignXorExpr

A bitwise exclusive-or assignment operation, for example x ^= y.

Assignment

An assignment. Either a local variable initialization (LocalVariableDeclAndInitExpr), a simple assignment (AssignExpr), or an assignment operation (AssignOperation).

LocalVariableDeclAndInitExpr

A local variable initialization, for example int x = 0.

RemoveEventExpr

An event removal, for example line 9 in