Re: complex List<> sorting

Tech-Archive recommends: Fix windows errors by optimizing your registry



I've decided to use another method to store the data.

Thank you guys for your help.

"Tem" <tem1232@xxxxxxxxx> wrote in message news:OtxgudTnIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
I have an Interface InterfaceBase, and two classes Type 1 and Type 2 that implements InterfaceBase

Class Type1 has a string property Title
Class Type2 has a string property Title and an int property Ordering

List<BaseC> list

I would like to sort the list by the value of Ordering (Type 1's Ordering is always 0) and a secondary order by the string property Title alphabetically.

I tried writing my own Comparision code, it doesn't seem to work

Thanks for your help

Tem


.



Relevant Pages

  • complex List<> sorting
    ... I have an Interface InterfaceBase, and two classes Type 1 and Type 2 that implements InterfaceBase ... Class Type1 has a string property Title ... Class Type2 has a string property Title and an int property Ordering ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: complex List<> sorting
    ... Class Type1 has a string property Title ... Class Type2 has a string property Title and an int property Ordering ... What is BaseC as opposed to InterfaceBase? ... I tried writing my own Comparision code, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: complex List<> sorting
    ... implements InterfaceBase ... Class Type1 has a string property Title ... Class Type2 has a string property Title and an int property Ordering ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: complex List<> sorting
    ... implements InterfaceBase ... Class Type1 has a string property Title ... Class Type2 has a string property Title and an int property Ordering ...
    (microsoft.public.dotnet.languages.csharp)