Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View the type of a C# generic in the debugger

When I hover over a generic type in Visual Studio using the debugger, I don't get the current type, is there a way to display it without going to the immediate window and typing ?typeof(T).Name?

like image 389
user4388177 Avatar asked Jan 06 '16 08:01

user4388177


People also ask

What are the 4 types of C?

Main types. The C language provides the four basic arithmetic type specifiers char, int, float and double, and the modifiers signed, unsigned, short, and long. The following table lists the permissible combinations in specifying a large set of storage size-specific declarations.

What are the 5 types of C?

Most of the time, for small programs, we use the basic fundamental data types in C – int, char, float, and double. For more complex and huge amounts of data, we use derived types – array, structure, union, and pointer. Enumeration and void consist of enum and void, respectively.

What is typeof () in C?

The typeof keyword is a new extension to the C language. The Oracle Developer Studio C compiler accepts constructs with typeof wherever a typedef name is accepted, including the following syntactic categories: Declarations. Parameter type lists and return types in a function declarator. Type definitions.


1 Answers

You can see the types in the callstack window by looking at the top line which will show the runtime evaluated type.

Also want to emphasize for others your suggestion:

going to the immediate window and typing ?typeof(T).Name

like image 64
Jay Jay Jay Avatar answered Sep 29 '22 21:09

Jay Jay Jay