Поделиться через


Метод SqlGeometry.STNumGeometries

Returns the number of SqlGeometry that comprise a SqlGeometry instance.

Пространство имен:  Microsoft.SqlServer.Types
Сборка:  Microsoft.SqlServer.Types (в Microsoft.SqlServer.Types.dll)

Синтаксис

'Декларация
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function STNumGeometries As SqlInt32
'Применение
Dim instance As SqlGeometry 
Dim returnValue As SqlInt32 

returnValue = instance.STNumGeometries()
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlInt32 STNumGeometries()
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public:
SqlInt32 STNumGeometries()
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member STNumGeometries : unit -> SqlInt32
public function STNumGeometries() : SqlInt32

Возвращаемое значение

Тип: System.Data.SqlTypes.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.

См. также

Справочник

SqlGeometry Класс

Пространство имен Microsoft.SqlServer.Types