次の方法で共有


SqlGeography.NumRings メソッド

Polygon インスタンス内のリングの合計数を返します。

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

構文

'宣言
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function NumRings As SqlInt32
'使用
Dim instance As SqlGeography 
Dim returnValue As SqlInt32 

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

戻り値

型: System.Data.SqlTypes.SqlInt32
リングの総数を示す SqlInt32 値です。このメソッドは、対象となるインスタンスが Polygon インスタンスではない場合に NULL を返し、空のインスタンスの場合に 0 を返します。

説明

SQL Server の geography 型では、すべてのリングが外部リングとして扱われるため、外部リングと内部リングは区別されません。

このメソッドは正確です。

関連項目

参照

SqlGeography クラス

Microsoft.SqlServer.Types 名前空間