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

Module Literal

Provides all literal classes.

All literals have the common base class Literal.

Import path

import semmle.code.csharp.exprs.Literal

Imports

Expr

Provides all expression classes.

Classes

BoolLiteral

A Boolean literal, for example true.

CharLiteral

A Unicode character literal, for example 'a'.

DecimalLiteral

A decimal literal, for example 5m.

DoubleLiteral

A double literal, for example 5D.

FloatLiteral

A float literal, for example 5F.

IntLiteral

An int literal, for example 0.

IntegerLiteral

An integer literal. Either an int literal (IntLiteral), a long literal (LongLiteral), a uint literal (UIntLiteral), or a ulong literal (ULongLiteral).

Literal

A literal. Either a Boolean literal (BoolLiteral), a Unicode character literal (CharLiteral), an integer literal (IntegerLiteral), a floating point literal (RealLiteral), a string literal (StringLiteral), or a null literal (NullLiteral).

LongLiteral

A long literal, for example -5L.

NullLiteral

A null literal.

RealLiteral

A floating point literal. Either a float literal (FloatLiteral), a double literal (DoubleLiteral), or a decimal literal (DecimalLiteral).

StringLiteral

A string literal. Either a string literal (StringLiteralUtf16), or a u8 literal (StringLiteralUtf8).

StringLiteralUtf16

A string literal, for example "Hello, World!".

StringLiteralUtf8

A u8 literal, for example "AUTH"u8

UIntLiteral

A uint literal, for example 5U.

ULongLiteral

A ulong literal, for example 5UL.