SqlGeometry.InstanceOf 方法 (String)

 

测试 SqlGeometry 实例是否与指定的类型相同。

命名空间:   Microsoft.SqlServer.Types
程序集:  Microsoft.SqlServer.Types(位于 Microsoft.SqlServer.Types.dll)

语法

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlBoolean InstanceOf(
    string geometryType
)
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
SqlBoolean InstanceOf(
    String^ geometryType
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member InstanceOf : 
        geometryType:string -> SqlBoolean
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)>
Public Function InstanceOf (
    geometryType As String
) As SqlBoolean

参数

返回值

Type: System.Data.SqlTypes.SqlBoolean

一个 SqlBoolean 值,该值指示调用 SqlGeometry 是否属于指定的几何图形类型。 如果 SqlGeometry 实例的类型与指定的类型相同,或者指定的类型是该实例类型的祖先,则返回 true。 否则,返回 false

备注

该方法的输入必须是以下项之一︰ Geometry、 点、 曲线、 LineString、 面、 多边形、 GeometryCollection、 MultiSurface、 MultiPolygon、 MultiCurve、 MultiLineString 和多点。 如果任何其他字符串用于输入,此方法将引发 ArgumentException。

另请参阅

SqlGeometry 类
Microsoft.SqlServer.Types 命名空间

返回页首