ShapeCollection.Item

ShapeCollection indexer (1 of 2)

Gets the Shape object at the specific index in the list.

public Shape this[int index] { get; }
ParameterDescription
indexThe index.

Examples


[C#]
//get the first shape
Shape shape = shapes[0];

See Also


ShapeCollection indexer (2 of 2)

Gets the Shape object by the name of the shape.

public Shape this[string name] { get; }
ParameterDescription
nameThe name of the shape.

Examples


[C#]
//add a shape
shapes.AddRectangle(2, 0, 2, 0, 130, 130);
//get the shape by the name.
Shape shape1 = shapes["Rectangle 1"];
if(shape1 != null)
{
    //Got the shape named 'Rectangle 1'.
}

See Also