I have
List<Canvas> cv = new List<Canvas>();
List<Button> btn = new List<Button>();
But I cannot do this:
cv.Add(btn);
How do I add list of Button to a list of Canvas?
I have
List<Canvas> cv = new List<Canvas>();
List<Button> btn = new List<Button>();
But I cannot do this:
cv.Add(btn);
How do I add list of Button to a list of Canvas?
You cannot add a list of buttons to a list of canvases, since a list of buttons is not a canvas.
Had that been possible, what would happen if you then write
cv.Last().DrawCircle(...)
You just called a DrawCircle
method on a List<Button>
.