ShapeCollection.Item
Contents
[
Hide
]ShapeCollection indexer (1 of 2)
Gets the Shape
object at the specific index in the list.
public Shape this[int index] { get; }
Parameter | Description |
---|---|
index | The index. |
Examples
[C#]
//get the first shape
Shape shape = shapes[0];
See Also
- class Shape
- class ShapeCollection
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells
ShapeCollection indexer (2 of 2)
Gets the Shape
object by the name of the shape.
public Shape this[string name] { get; }
Parameter | Description |
---|---|
name | The 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
- class Shape
- class ShapeCollection
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells