I using a genric list(m_equipmentList ) which is collection of objects (Schedule_Payitem).
How can sort list according to a proerty of child object ?
Dim m_
I don't know vb.net so I did it in C#
m_equipmentList.Sort(
(payItem1,payItem2)=>payItem1.ResourceID.CompareTo(payItem2.ResourceID));
and using the reflector translated it to vb.net hope it helps
m_equipmentList.Sort(
Function (ByVal payItem1 As Schedule_Payitem, ByVal payItem2 As Schedule_Payitem)
Return payItem1.ResourceID.CompareTo(payItem2.ResourceID)
End Function)
or you can inherit Schedule_Payitem from IComparable and implement CompareTo and then just call m_equipmentList.Sort()