T
Tony Johansson
Hello!
I have a collection of objects with the following important fields for this
question
string TAB;
string value;
Here is an example how it could look like.
TAB Value
A1 c1
A1 c1
A1 c1
A1 c1
A1 c1
A3 23
A3 23
A3 23
A6 45
A6 45
A1 7
A1 7
A1 7
What I want is to get the following answer from a linq query but I don't
thing it's possible to write such a query
5,3,2,3
So I want to group on TAB and Value in a way but don't allowed to move any
rows. In this case I have 5 rows
in sequence with TAB = A1 and the value is c1.
Then I have 3 rows with TAB = A3 and value = 23.
Then I have 2 rows with TAB = A6 and value = 45.
Then I have 3 rows with TAB = A1 and value = 7.
Does anybody have a good algoritm to solve this if it's not possible to use
linq ?
//Tony
I have a collection of objects with the following important fields for this
question
string TAB;
string value;
Here is an example how it could look like.
TAB Value
A1 c1
A1 c1
A1 c1
A1 c1
A1 c1
A3 23
A3 23
A3 23
A6 45
A6 45
A1 7
A1 7
A1 7
What I want is to get the following answer from a linq query but I don't
thing it's possible to write such a query
5,3,2,3
So I want to group on TAB and Value in a way but don't allowed to move any
rows. In this case I have 5 rows
in sequence with TAB = A1 and the value is c1.
Then I have 3 rows with TAB = A3 and value = 23.
Then I have 2 rows with TAB = A6 and value = 45.
Then I have 3 rows with TAB = A1 and value = 7.
Does anybody have a good algoritm to solve this if it's not possible to use
linq ?
//Tony