I have a list of objectsList<Batch> batchesList new List<Batch>();
with fields string orderNo
and int lineNo
I print "orderNo-lineNo"
I want to sort it by orderNo then lineNo. The problem I have is that using linq's sort(), this will sort as a string, thus 11AG131-13 would actually come before 11AG131-2
batchesList.Sort((x, y) => (x.orderNo + x.lineNo).CompareTo(y.orderNo + y.lineNo));
Thanks for help