CodeQL library for C#
Search

Module Type

Provides classes for types.

Import path

import semmle.code.csharp.Type

Imports

Callable

Provides Callable classes, which are things that can be called such as methods and operators.

Event

Provides classes representing events and event accessors.

Generics

Provides support for generic types and methods.

Location

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

Namespace

Provides classes for namespaces.

Property

Provides classes for properties, indexers, and accessors.

Classes

AnonymousClass

A class generated by the compiler from an anonymous object creation.

ArglistType

The __arglist type, modeling varargs invocation in C++.

ArrayType

An array type, for example int[].

BoolType

The Boolean type, bool.

ByteType

The byte type.

CDeclCallingConvention

Unmanaged C/C++-style calling convention where the call stack is cleaned by the caller.

CallingConvention

Represents a signature calling convention. Specifies how arguments in a given signature are passed from the caller to the callee.

CharType

The Unicode character type, char.

Class

A class, for example

DecimalType

The high-precision decimal type, decimal.

DefaultCallingConvention

Managed calling convention with fixed-length argument list.

DelegateType

A delegate type, for example

DoubleType

The double type.

DynamicType

The dynamic type.

Enum

An enum. For example

FastCallCallingConvention

Unmanaged calling convention where arguments are passed in registers when possible.

FloatType

The float type.

FloatingPointType

A floating point type.

FunctionPointerType

A function pointer type, for example

IntType

The int type.

IntegralType

An integral type.

Interface

An interface, for example

LongType

The long type.

NestedType

A nested type, for example class B in

NonNestedType

A non-nested type, that is declared directly in a namespace.

NullType

The null type. The type of the null literal.

NullableType

A nullable type, for example int?.

ObjectType

The object type, System.Object.

PointerType

A pointer type, for example char*.

RefType

A reference type.

SByteType

The signed byte type, sbyte.

ShortType

The short type.

SignedIntegralType

A signed integral type.

SimpleType

A simple type. Simple types in C# are predefined struct types. Here, however, they are not modeled as such, and we reserve the notion of structs to user-defined structs.

StdCallCallingConvention

Unmanaged calling convention where call stack is cleaned up by the callee.

StringType

The string type, System.String.

Struct

A struct, for example

ThisCallCallingConvention

Unmanaged C++-style calling convention for calling instance member functions with a fixed argument list.

TupleType

A type representing a tuple. For example, (int, bool, string).

Type

A type.

TypeMention

A type mention, that is, any mention of a type in a source code file. For example, int is mentioned in int M() { return 1; }.

UIntType

The unsigned int type, uint.

ULongType

The unsigned long type, ulong.

UShortType

The unsigned short type, ushort.

UnknownType

A type that could not be resolved. This could happen if an indirect reference is not available at compilation time.

UnsignedIntegralType

An unsigned integral type.

ValueOrRefType

A value or reference type.

ValueType

A value type.

VarArgsCallingConvention

Managed calling convention for passing extra arguments.

VoidType

The void type.