SqlGeometry.STNumGeometries 方法 ()
返回组成 SqlGeometry 实例的 SqlGeometry 的个数。
命名空间: Microsoft.SqlServer.Types
程序集: Microsoft.SqlServer.Types(位于 Microsoft.SqlServer.Types.dll)
语法
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlInt32 STNumGeometries()
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
SqlInt32 STNumGeometries()
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member STNumGeometries : unit -> SqlInt32
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)>
Public Function STNumGeometries As SqlInt32
返回值
Type: System.Data.SqlTypes.SqlInt32
如果 SqlGeometry 实例不是 MultiPoint、MultiLineString、MultiPolygon 或 GeometryCollection 实例,则返回 1;如果 SqlGeometry 实例为空,则返回 0。
备注
如果几何图形集合嵌套了空元素 STNumGeometries 将不会返回 0。 尽管几何图形集合实例中的元素都是空的该实例本身不是一个空集。
另请参阅
SqlGeometry 类
Microsoft.SqlServer.Types 命名空间
返回页首