나는 날짜와 문자열이 포함 된 listitem을 가진 arraylist를 보유하고 있습니다. 이 Arraylist를 Date를 기준으로 정렬하고 싶습니다. arraylist 항목에 대해 다음과 같은 의사 코드가 있습니다. 120-M
2013년 5월 1일을 허용 - -
2013년 2월 2일 101-M 허용listitem을 기준으로 arraylist를 정렬하는 방법
ArrayList _arListDAte = new ArrayList();
//foreach loop for DAtatable rows
ListItem lstitem = new ListItem();
//here is condition for assigning text to lstitem
//if condition match
lstitem.Text = Today.Date() + ' - Allowed'
//else
lstitem.Text = Today.Date() + ' - Not allowed'
listitem.value = datarow[id]+'-M';
그래서 결국 내 ArrayList에 데이터
텍스트 값
2013년 11월 4일 아래 포함 - 허용 121-M
8-8-2012 - 허용되지 않음 126-NM
이 arraylist를 오름차순으로 정렬하고 싶습니다.