ShapeCollection.Remove

ShapeCollection.Remove method

Remove the shape.

public void Remove(Shape shape)
ParameterTypeDescription
shapeShape

Examples


[C#]
//add first shape
shapes.AddRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.AddRectangle(6, 0, 2, 0, 30, 30);

//get the shape
Shape s = shapes["Rectangle 1"];// or shapes[0];
if (s != null)
{
    //remove 
    shapes.Remove(s);
}

See Also