次の方法で共有


SqlGeography.STNumGeometries メソッド

SqlGeography インスタンスを構成するジオメトリの数を返します。

名前空間:  Microsoft.SqlServer.Types
アセンブリ:  Microsoft.SqlServer.Types (Microsoft.SqlServer.Types.dll)

構文

'宣言
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function STNumGeometries As SqlInt32
'使用
Dim instance As SqlGeography 
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
SqlGeography インスタンスを構成するジオメトリの数を示す SqlInt32 値です。

説明

このメソッドは、geography インスタンスが MultiPoint、MultiLineString、MultiPolygon、GeometryCollection の各インスタンスのいずれかでない場合は 1 を返し、SqlGeography インスタンスが空の場合は 0 を返します。

関連項目

参照

SqlGeography クラス

Microsoft.SqlServer.Types 名前空間