You can always define a class like this:
public class item {
int id;
string name;
}
and then use it like this:
List<item> items = new List<item>();
Can we not do something like this:
var items = new List<{int id, string name}>();
Just a short way of initializing when underlying object definition is simple and predictable.
This is possible in JavaScript (I have seen examples in Angular).
Sorry if this is answered before, my quick search could not find an answer to this specific topic on Google or SO.
var items = new List<(int Id, string Name)>()