Table of Contents

TryGetType Method

Definition

TryGetType(string, out Type)

Attempts to get the Type with the specified typeName, performing a case-sensitive search.

public static bool TryGetType(string typeName, out Type type)

Parameters

typeName string

The assembly-qualified name of the type to get. See AssemblyQualifiedName. If the type is in the currently executing assembly or in mscorlib.dll/System.Private.CoreLib.dll, it is sufficient to supply the type name qualified by its namespace.

type Type

The type with the specified typeName. If the type is not found, null is returned.

Returns

bool

true if the Type was found, false otherwise.