SqlGeography.STGeometryN 方法 (Int32)

 

返回 GeometryCollection 或其子类型之一中的指定地理元素。

命名空间:   Microsoft.SqlServer.Types
程序集:  Microsoft.SqlServer.Types(位于 Microsoft.SqlServer.Types.dll)

语法

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlGeography STGeometryN(
    int n
)
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
SqlGeography^ STGeometryN(
    int n
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member STGeometryN : 
        n:int -> SqlGeography
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)>
Public Function STGeometryN (
    n As Integer
) As SqlGeography

参数

  • n
    Type: System.Int32

    一个 int 表达式,其值介于 1 和 GeometryCollection 中的 SqlGeography 实例数之间。

返回值

Type: Microsoft.SqlServer.Types.SqlGeography

GeometryCollection 的指定实例中的一个 SqlGeography 元素。

备注

此方法时使用的子类型 GeometryCollection, ,如 MultiPointMultiLineString, ,此方法返回 SqlGeography 实例如果调用使用 N = 1。

如果参数大于结果的此方法返回 null STNumGeometries 和表达式参数为等于或大于 1 时,将引发 ArgumentOutOfRangeException。

另请参阅

SqlGeography 类
Microsoft.SqlServer.Types 命名空间

返回页首