I have a list of objects called images which are obtained from parsing through a text file. They contain details such as the catagory and description. I want to be able to search through the list to find the images with a certain catagory and then display them on a form i have setup. I want to filter through them and then also be able to revert back to the unfiltered view aswell.
class Image
{
public string FileName { set; get; }
public string Description { set; get; }
public string Catagory { set; get; }
public string Date { set; get; }
public string Comments { set; get; }
}
This is what i want to do in Linq
string chosenCatagory = CatagoryComboBox.Text;
ImageList = ImageList.Where(x => x.Catagory == chosenCatagory).ToList();
What would be the best way to approach this without using Linq?