SqlGeography インスタンスが、指定した型と同じであるかどうかをテストします。
名前空間: 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 SqlGeography
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
パラメーター
- geometryType
型: System.String
geography 型の階層で公開されている 12 種類の型のうちの 1 つを指定する string です。
戻り値
型: System.Data.SqlTypes.SqlBoolean
SqlGeography インスタンスが指定されたジオメトリ型と同じであるどうかを示す SqlBoolean 値です。geography インスタンスの型が指定した型と同じである場合、または指定した型がインスタンスの型の先祖である場合は true を返します。それ以外の場合は false を返します。
説明
このメソッドで指定する値は、T:Microsoft.SqlServer.Types.SqlGeometry、Point、Curve、LineString、Surface、Polygon、GeometryCollection、MultiSurface、MultiPolygon、MultiCurve、MultiLineString、および MultiPoint のいずれかにする必要があります。
このメソッドは、上記以外の文字列が入力に使用された場合、ArgumentException をスローします。