c# type of generic is string

C#
if (typeof(T) == typeof(String)) return (T)(object)String.Empty;
Source

Also in C#: