Home
Options

Determine type of T in Generic Method when debugging.

If you are debugging a generic method, is there any way to tell what type T is ?

e.g.

void Main()
{
    GenericMethod<String>();
}

public void GenericMethod<T>()
{
    var prop = typeof(T).GetProperties().Dump();
}

I tried adding typeof(T) in the watch window but it doesn't work.

Comments

Sign In or Register to comment.