Can the new feature in C# 7.0 (in VS 2017) to give tuple fields names be translated to KeyValuePairs?
Lets assume I have this:
class Entry
{
public string SomeProperty { get; set; }
}
var allEntries = new Dictionary<int, List<Entry>>();
// adding some keys with some lists of Entry
It would be nice to do something like:
foreach ((int collectionId, List<Entry> entries) in allEntries)
I have already added System.ValueTuple
to the project.
Being able to write it like that would be much better than this traditional style:
foreach (var kvp in allEntries)
{
int collectionId = kvp.Key;
List<Entry> entries = kvp.Value;
}