I used a struct
public struct stuff { public int ID; public int quan; }
in List<stuff> stuff = new List<stuff>();
List<stuff> stuff = new List<stuff>();
How i can check the list already have a stuff "where ID = 1"?
You can use LINQ very easily
bool res = stuff.Any(c => c.ID == 1);
1.4m articles
1.4m replys
5 comments
57.0k users