Search code examples
c#-7.0valuetuple

Base type of ValueTuple<T1, T2>


Can't figure out with next comparing:

var type = typeof(ValueTuple<int, string>);
if (type.BaseType == typeof(ValueTuple)) 
// returns 'false', however, 'type.BaseType' is 'System.ValueTuple' at runtime   

Who can to explain that?


Solution

  • As with any struct the base type is System.ValueType.

    The similarity to the human eye got me confused for a minute or two.