hello, how do I code a list of couple of int??? Why doens't C# permit it?
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Nov 1, 2007, 2:01 PM
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!