Version

Add(WorksheetShape) Method

Adds a shape to the collection.
Syntax
public void Add( 
   WorksheetShape shape
)

Parameters

shape
The shape to add to the collection.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionshape is null.
System.InvalidOperationExceptionshape has already been added to a worksheet or group.
System.InvalidOperationExceptionshape does not have the TopLeftCornerCell or BottomRightCornerCell set.
System.InvalidOperationExceptionAdding shape to this collection will place it on a different worksheet then either its TopLeftCornerCell or BottomRightCornerCell or shape is a WorksheetShapeGroup and adding it to this collection will create a similar situation for one of its descendant shapes.
System.InvalidOperationExceptionshape is a WorksheetShapeGroup and this is the group's collection of shapes.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also