Код: Выделить всё
class A1
{
public virtual T? F1(T? t) where T : struct { throw new NotImplementedException(); }
public virtual T? F1(T? t) where T : class { throw new NotImplementedException(); }
}
Код: Выделить всё
class A1
{
public virtual T? F1(T t) where T : struct { throw new NotImplementedException(); }
public virtual T? F1(T t) where T : class { throw new NotImplementedException(); }
}
как получается, что подписи одинаковы, если в одном случае это значение типы и в другом случае для ссылочных типов?
Подробнее здесь: https://stackoverflow.com/questions/793 ... xplanation
Мобильная версия