[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Body.CanAdd

CanAdd Method

CanAdd(Type)

Checks whether a ContentObject of the specified type can be added to the current body.

Declaration
public bool CanAdd(Type contentObjectType)
Public Function CanAdd(contentObjectType As Type) As Boolean
Parameters
Type Name Description
Type contentObjectType

The type of the content object to add.

Returns
Type Description
bool

true if a content object of the specified type can be added, false otherwise.

CanAdd(Type, out Exception)

Checks whether a ContentObject of the specified type can be added to the current body.

Declaration
public bool CanAdd(Type contentObjectType, out Exception ex)
Public Function CanAdd(contentObjectType As Type, ByRef ex As Exception) As Boolean
Parameters
Type Name Description
Type contentObjectType

The content object type to add.

Exception ex

OUT: the exception that would be thrown if a content object of the specified type was added.

Returns
Type Description
bool

true if a content object of the specified type can be added, false otherwise.