Поделиться через


Метод SqlGeometry.InstanceOf

Tests if the SqlGeometry instance is the same as the specified type.

Пространство имен:  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
A SqlBoolean value indicating if the calling SqlGeometry is of the specified geometry type. Returns true if the type of a SqlGeometry instance is the same as the specified type, or if the specified type is an ancestor of the instance type. Otherwise, returns false.

Замечания

The input for the method must be one of the following: Geometry, Point, Curve, LineString, Surface, Polygon, GeometryCollection, MultiSurface, MultiPolygon, MultiCurve, MultiLineString, and MultiPoint. This method throws an ArgumentException if any other strings are used for the input.

См. также

Справочник

SqlGeometry Класс

Пространство имен Microsoft.SqlServer.Types