|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
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? On 17/07/2006 Milos wrote:
> would like to sort some objects (have some properties like ObjectName, Can you add a property called, say, 'SortOrder' and sort on that?>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? -- Jeff Gaines 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? > |
|||||||||||||||||||||||