What is the best way to organize a lot of data which contains multiple conditions?

You could organize your data as follows: class Program { static void Main(string[] args) { List<Criteria> list = new List<Criteria>() { new Criteria(Color.green, Country.england, Town.london, GoodBad.good, DayOfTheWeek.sunday, Daytime.evening), new Criteria(Color.red, Country.thenetherlands, Town.amsterdam, GoodBad.bad, DayOfTheWeek.monday, Daytime.night), new Criteria(Color.blue, Country.america, Town.newyork, GoodBad.bad, DayOfTheWeek.tuesday, Daytime.morning), }; Console.WriteLine(“- Native sorting:”); list.Sort(); foreach(var criteria in list) { Console.WriteLine(criteria); } Console.WriteLine(); … Read more

2 ways of list making in c# [duplicate]

The two types you are referring to are: A type of Collection called a List, which would be defined as List aList = new List {“first” , “second”} An array, defined as string[ ] aList = {“first”, “second”} An array is a fixed-length, i.e. you typically define it saying it will contain a set number … Read more

I need a way around to tackle the following IndexOutOfBoundsException [closed]

The exception originates from my_data.get(position) in your onProgressChanged() listener. This listener is called asynchronously, when progress changes, but it refers to the original position provided, when you perform the onBindViewHolder(). So when at time X you do the onBindViewHolder(), position with value 2 is valid (if there are at least 3 entries in the list). … Read more