|
|
От: |
desco
|
http://v2matveev.blogspot.com |
| Дата: | 13.12.06 07:59 | ||
| Оценка: | |||
private static void Print<T>(T obj)
{
Type t = typeof (T);
if (t.IsGenericType)
{
if (t.GetGenericTypeDefinition() == typeof(Nullable<>))
{
Console.WriteLine("Nullable");
Console.WriteLine(t.GetGenericArguments()[0].IsEnum);
}
else
{
Console.WriteLine("Not nullable");
}
}
}