Share via


SqlGeography.InstanceOf(String) Method

Definition

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

[Microsoft.SqlServer.Server.SqlMethod(IsDeterministic=true, IsPrecise=true)]
public System.Data.SqlTypes.SqlBoolean InstanceOf (string geometryType);
[<Microsoft.SqlServer.Server.SqlMethod(IsDeterministic=true, IsPrecise=true)>]
member this.InstanceOf : string -> System.Data.SqlTypes.SqlBoolean
Public Function InstanceOf (geometryType As String) As SqlBoolean

Parameters

geometryType
String

A string that specifies one of the 12 types exposed in the geography type hierarchy.

Returns

A SqlBoolean value that indicates whether the SqlGeography instance is the same as the specified geometry type.Returns true if the type of a geography instance is the same as the specified type, or if the specified type is an ancestor of the instance type; otherwise, returns false.

Attributes

Applies to