Module Type

Provides classes for types.

Import path

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.

Predicates

getTypeRef

INTERNAL: Do not use. Gets a type reference for a given type type. This is used for extensionals that can be supplied as either type references or types.

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.

CharType

The Unicode character type, char.

Class

A class, for example

DecimalType

The high-precision decimal type, decimal.

DelegateType

A delegate type, for example

DoubleType

The double type.

DynamicType

The dynamic type.

Enum

An enum. For example

FloatType

The float type.

FloatingPointType

A floating point type.

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.

StringType

The string type, System.String.

Struct

A struct, for example

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.

VoidType

The void type.