Tôi có một lớp PropertyDetails
:làm thế nào để sắp xếp Danh sách <T> trong C#/.net
public class PropertyDetails
{
public int Sequence { get; set; }
public int Length { get; set; }
public string Type { get; set; }
}
tôi đang tạo ra một danh sách các PropertyDetails
như
List<PropertyDetails> propertyDetailsList=new List<PropertyDetails>();
Tôi muốn sắp xếp danh sách này bằng PropertyDetails.Sequence
.
Giải pháp LINQ được hoan nghênh.
Danh sách propertyDetailsList = new List (); –
PramodChoudhari