Open sandboxFocus

Method AsINamedType

AsINamedType(Type)

Gets the INamedType that represents a reflection Type in the current compilation. This method is equivalent to GetNamedType(Type).

Declaration
public static INamedType AsINamedType(this Type type)
Parameters
Type Name Description
Type type

The reflection type, for instance typeof(Console).

Returns
Type Description
INamedType
Exceptions
Type Condition
ArgumentOutOfRangeException

type is not a named type, for instance an array type or a pointer type.