I want to store objects in a List and have therefore created a class with 3 properties; prop1. prop2 and prop3.
To add a new Item to my List I'm using for example
_st.Add(new Bld(100,20,"Test1");
_st.Add(new Bld(101,20,"Test2");
_st.Add(new Bld(102,54,"Test3");
Now: How can I search the list to get the index of an Item
that contains myObj.prop2 = 20 AND myObj.prop3="Test1"
?
I've tried something like
_st.Where(tk => tk.prop1 == 1000 AND tk.Title == "Test1");
but this obviously doesn't work.
Any idea how to solve this problem?
Thanks in advance