I have an ArrayList filled with a bunch of Points, and I want to iterate over them, so I use this code:
for (int i = 0; i < currentClicks.Count; i++) { if (i > 0)
and I get this error in the clickPos and prevPos :
Cannot implicitly convert type 'object' to 'System.Drawing.Point'. An explicit conversion exists (are you missing a cast?)
Why is this? I have clickPos and prevPos defined like this:
private System.Drawing.Point clickPos; private System.Drawing.Point prevPos;
Edit
When I comment out the lines of clickPos and prevPos and add
MessageBox.Show(currentClicks[i].GetType().ToString());
the message field says System.Drawing.Point
source share