First you need to add an extension method for KeyValuePair :
public static void Deconstruct<T1, T2>(this KeyValuePair<T1, T2> tuple, out T1 key, out T2 value) { key = tuple.Key; value = tuple.Value; }
Then you will get another error:
error CS8179: the predefined type 'System.ValueTuple`2' is not defined or not imported
According to this answer you need to install the NuGet System.ValueTuple package.
Then it should compile. However, Visual Studio 2017 RC4 will say that it cannot resolve symbol names name and age . They should hope to fix this in a future update.
source share