hello, how do I code a list of couple of int??? Why doens't C# permit it?
thanks
List<int,int>
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Nov 1, 2007, 10:01 AM EDT
Define a struct to hold two integers:
public struct PairOfInts
{
public int First;
public int Second;
}
Now create a List
I've heard some talk that 'tuple' types may be included in C# 4.0 but don't hold your breath!