public class Box<T>
{
public T Value { get; set; }
}
var box = new Box<int>();
box.Value = 42;What is the compile-time type of
box.Value?- aobject
- bdynamic
- cint✓
- dT
Explanation:When
Box<T> is closed with int (i.e. Box<int>), every occurrence of T inside the type is replaced by int, so box.Value has the concrete compile-time type int, not the open type parameter T.