I have a generic collection of type MyImageClass, and MyImageClass has an boolean property "IsProfile". I want to sort this generic list which IsProfile == true stands at the start of the list.
I have tried this.
rptBigImages.DataSource = estate.Images.OrderBy(est=>est.IsProfile).ToList();
with the code above the image stands at the last which IsProfile property is true. But i want it to be at the first index. I need something Asc or Desc. Then i did this.
rptBigImages.DataSource = estate.Images.OrderBy(est=>est.IsProfile).Reverse.ToList();
Is there any easier way to do this ?
Thanks