Home All Groups Group Topic Archive Search About
Author
17 Jul 2006 1:17 PM
Milos
would like to sort some objects (have some properties like ObjectName,
ValidFrom, ValidTo, Code,..) I would like sort this items via specific order,
for example:
I have a collection of object with Code N, V, C, S, Ts, Tv, B and need o
sort in this order V, N, C, Ts, Tv, B, S.
Is this possible?

Author
17 Jul 2006 1:45 PM
Jeff Gaines
On 17/07/2006 Milos wrote:

>  would like to sort some objects (have some properties like ObjectName,
>ValidFrom, ValidTo, Code,..) I would like sort this items via specific
>order,
>for example:
>I have a collection of object with Code N, V, C, S, Ts, Tv, B and need o
>sort in this order V, N, C, Ts, Tv, B, S.
>Is this possible?

Can you add a property called, say, 'SortOrder' and sort on that?

--
Jeff Gaines
Author
17 Jul 2006 2:30 PM
Lloyd Dupont
What about?
List<T>public void Sort (
    Comparison<T> comparison
)
Show quote
"Milos" <Mi***@discussions.microsoft.com> wrote in message news:1A147585-003C-4415-A4D1-0C98C1AD0F5B@microsoft.com...
> would like to sort some objects (have some properties like ObjectName,
> ValidFrom, ValidTo, Code,..) I would like sort this items via specific order,
> for example:
> I have a collection of object with Code N, V, C, S, Ts, Tv, B and need o
> sort in this order V, N, C, Ts, Tv, B, S.
> Is this possible?
>

AddThis Social Bookmark Button