tobermory20
Programmer
I am having an issue with adding two elements to a list at the same time does anyone know how to make this happen or an alternative for it. I keep getting an error message about no overloading here is an example the JunkMonkey had helped with...
Thank you,
T.
Code:
public List<Ellipse> lstEllipses = new List<Ellipse>();
public class Ellipse
{
public int x;
public int y;
public int h = 25;
public int w = 25;
public void MyEllipse(int x, int y)
{
int X = x;
int Y = y;
//w = 25;
//h = 25;
}
public void Draw(Graphics g)
{
g.DrawEllipse(new Pen(Color.Black, 2), x, y, w, h);
}
}
//This adds a new ellipse at the clicked point.
lstEllipses.Add(new Ellipse(e.X, e.Y));
Thank you,
T.