Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SqlGeometry::STNumGeometries Method

Returns the number of SqlGeometry that comprise a SqlGeometry instance.

Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public:
SqlInt32 STNumGeometries()

Return Value

Type: SqlInt32
Returns 1 if the SqlGeometry instance is not a MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection instance, and 0 if the SqlGeometry instance is empty.

If a geometry collection has nested empty elements, STNumGeometries will not return 0. Though the elements in the geometry collection instance are empty, the instance itself is not an empty set.

Community Additions

Show:
© 2015 Microsoft