[]
Returns a single object from a collection.
IShape this[string index] { get; }
ReadOnly Default Property Item(index As String) As IShape
| Type | Name | Description |
|---|---|---|
| string | index | The name of the shape. |
IShapes shapes = worksheet.Shapes;
IShape rectangle = shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
rectangle.Name = "Rectangle 1";
IShape oval = shapes.AddShape(AutoShapeType.Oval, 140, 20, 100, 60);
oval.Name = "Oval 1";
IShapeRange shapeRange = shapes.Range[new string[] { "Rectangle 1", "Oval 1" }];
IShape ovalShape = shapeRange["Oval 1"];