Metoda SqlGeometry.InstanceOf
Badania, jeśli SqlGeometry wystąpienie jest taka sama jak określonego typu.
Przestrzeń nazw: Microsoft.SqlServer.Types
Zestaw: Microsoft.SqlServer.Types (w Microsoft.SqlServer.Types.dll)
Składnia
'Deklaracja
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function InstanceOf ( _
geometryType As String _
) As SqlBoolean
'Użycie
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
Parametry
- geometryType
Typ: System.String
Określa typ geometrii, wywołujący SqlGeometry zostanie porównana.
Wartość zwracana
Typ: System.Data.SqlTypes.SqlBoolean
A SqlBoolean wartości wskazujące Jeśli wywołujący SqlGeometry jest geometria określonego typu.Zwraca true Jeśli typ SqlGeometry wystąpienie jest taki sam, jak określony typ lub jeśli określony typ element nadrzędny typu wystąpienia.W przeciwnym razie zwraca false.
Uwagi
Dane wejściowe dla metoda musi być jedną z następujących czynności: Geometria, punkt, krzywa, LineString, powierzchni, Wielokąt, GeometryCollection, MultiSurface, MultiPolygon, MultiCurve, MultiLineString i MultiPoint.Ta metoda generuje ArgumentException, jeśli używane są inne ciągi dla danych wejściowych.