Table of Contents

Class KnownTypeReference

Namespace
ICSharpCode.Decompiler.TypeSystem
Assembly
ICSharpCode.Decompiler.dll

Contains well-known type references.

public sealed class KnownTypeReference : ITypeReference
Inheritance
KnownTypeReference
Implements
Inherited Members

Properties

AllKnownTypes

public static IEnumerable<KnownTypeReference> AllKnownTypes { get; }

Property Value

IEnumerable<KnownTypeReference>

KnownTypeCode

public KnownTypeCode KnownTypeCode { get; }

Property Value

KnownTypeCode

Name

public string Name { get; }

Property Value

string

Namespace

public string Namespace { get; }

Property Value

string

TypeName

public TopLevelTypeName TypeName { get; }

Property Value

TopLevelTypeName

TypeParameterCount

public int TypeParameterCount { get; }

Property Value

int

Methods

Get(KnownTypeCode)

Gets the known type reference for the specified type code. Returns null for KnownTypeCode.None.

public static KnownTypeReference? Get(KnownTypeCode typeCode)

Parameters

typeCode KnownTypeCode

Returns

KnownTypeReference

GetCSharpNameByTypeCode(KnownTypeCode)

Gets the C# primitive type name from the known type code. Returns null if there is no primitive name for the specified type.

public static string? GetCSharpNameByTypeCode(KnownTypeCode knownTypeCode)

Parameters

knownTypeCode KnownTypeCode

Returns

string

Resolve(ITypeResolveContext)

public IType Resolve(ITypeResolveContext context)

Parameters

context ITypeResolveContext

Returns

IType

ToString()

public override string ToString()

Returns

string