There is a structure and a list of its objects. How to check the existence of an element with a specific index?
public static struct Coord { int id; int x; int y; public Coord(int _id, int _x, int _y) :this() { x = _x; y = _y; } } static List<Coord> house=new List<Coord>();
So nizyayaya!
if (house.Count>1 && house[id]!=null) { }
How can you?
if(id>=0 && id<house.Count){ }
- qzavyerid
? Number sequence number of the record or id from the structure? - Zufir