Answer the question
In order to leave comments, you need to log in
How can I find out the number of elements in a class (maybe I didn't describe it that way)?
Hello. It is necessary to store the X,Y coordinate. I made a class like this:
class posBoll
{
public int XposBollX;
public int XposBollY;
public posBoll(int X, int Y)
{
this.XposBollX = X;
this.XposBollY = Y;
}
}
List<posBoll> posBoll = new List<posBoll>();
posBoll xy;
......
xy = new posBoll(i, j); posBoll.Add(xy);
textBox1.Text = posBoll[0].XposBollX.ToString() + " " + posBoll[0].XposBollY.ToString();
textBox1.Text += " " + posBoll[1].XposBollX.ToString() + " " + posBoll[1].XposBollY.ToString();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question