Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InstanceOf Method
Collapse the table of content
Expand the table of content

SqlGeography::InstanceOf Method

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

Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public:
SqlBoolean InstanceOf(
	String^ geometryType
)

Parameters

geometryType
Type: String
A string that specifies one of the 12 types exposed in the geography type hierarchy.

Return Value

Type: SqlBoolean
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.

The input for the method must be one of the following: T:Microsoft.SqlServer.Types.SqlGeometry, 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.

Community Additions

ADD
Show:
© 2015 Microsoft