objet 목록 (키, 이름)을 이름으로 주문할 수있는 방법을 알려주거나 가이드를 제공 할 수 있는지 궁금하지만 이름은 LocalizedText 형식이며 어쩌면 나는 그렇게 할 수 있습니다. 바보 같지만이 목록을 주문할 수 없습니다. 당신이 너무 List(Of Object)
을 사용하고있는 경우는 같은 것이다 종류 - 2와 List()
이 없을 수현지화 된 텍스트 목록을 주문하는 방법
//Objects definied on my class:
[DataMember]
public virtual Guid ComplaintPreventableStateId { get; set; }
[DataMember]
public virtual LocalizedText Name { get; set; }
//function that tries to get information:
IList<ComplaintPreventableState> complaintPreventableList = new List<ComplaintPreventableState>();
complaintPreventableList = (from c in ComplaintPreventableState.All select c).ToList();
//Tried this two options:
complaintPreventableList.OrderByDescending(h => h.Name);
complaintPreventableList.OrderBy(h => h.Name);
일부 코드를 게시해야합니다. 당신이 가지고있는 어떤 것도 도움이 될 것입니다. 대답은 모두 가정에 근거하고 있지만 답변을 넣었습니다. – Darren
내 대답을 다시 읽습니다 ... 업데이트 추가 중. 전에 말한 것을 다시 반복하십시오. 당신은 그 순서를 다시 자신에게 할당하지 않습니다. OrderBy를 호출하면 목록에서 .tolist()를 호출 할 때 사용할 메서드를 설정할 수 있습니다. 당신이 그것을 원한다면 당신은 그것을 저장해야합니다. – Darren