Hi Yes, I'm new to c#! :) i'm using .Net4 VS2010.
I have Three classes each one is used to build a list of objects of that type. All three inherit form a base class.
I want to combine the resulting three lists in to one and sort them on one of the base class elements.
Can this be done with lists of different types?
Simplified Example:
Each list is created
public List<TestOne> TestOne list;
public List<TestTwo> TestTwoList;
public List<object> BothLists;
Code to fill TestOne and TestTwo…
What/How do I combine both TestOne and TestTwo into BothLists and sort them on SeqNumber???
public class BaseClassTest
{
public string Loc { get; set; } // loc
// sequence number to order by will be assigned in the resulting class
public int SeqNumber { get; set; }
}
public class TestOne : BaseClassTest
{
public int Number { get; set; }
}
public class TestTwo : BaseClassTest
{
public string CatName { get; set; }
}