次の方法で共有


SqlGeometry.InstanceOf メソッド

SqlGeometry インスタンスが、指定した型と同じであるかどうかをテストします。

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

構文

'宣言
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function InstanceOf ( _
    geometryType As String _
) As SqlBoolean
'使用
Dim instance As SqlGeometry 
Dim geometryType As String 
Dim returnValue As SqlBoolean 

returnValue = instance.InstanceOf(geometryType)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlBoolean InstanceOf(
    string geometryType
)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public:
SqlBoolean InstanceOf(
    String^ geometryType
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member InstanceOf : 
        geometryType:string -> SqlBoolean
public function InstanceOf(
    geometryType : String
) : SqlBoolean

パラメーター

戻り値

型: System.Data.SqlTypes.SqlBoolean
呼び出し元の SqlGeometry が指定された geometry の型かどうかを示す SqlBoolean 値です。SqlGeometry インスタンスの型が指定した型と同じ場合、または指定した型がインスタンス型の先祖である場合は true を返します。それ以外の場合は false を返します。

説明

メソッドへの入力は、Geometry、Point、Curve、LineString、Surface、Polygon、GeometryCollection、MultiSurface、MultiPolygon、MultiCurve、MultiLineString、および MultiPoint のいずれかである必要があります。 このメソッドは、上記以外の文字列が入力に使用された場合、ArgumentException をスローします。

関連項目

参照

SqlGeometry クラス

Microsoft.SqlServer.Types 名前空間