Based on the current selection, it determines whether it is possible to delete if entire rows or columns are selected.
BOOL CanDelete( )
TRUE if entire rows or columns are selected else FALSE.
//before running please highlight one column or one row
Worksheet wks = Project.ActiveLayer();
if(gg && gg.CanDelete())