Metoda SqlGeography.STGeometryN
Zwraca element geograficznym określonym w GeometryCollection lub jednym z jego podtypów.
Przestrzeń nazw: Microsoft.SqlServer.Types
Zestaw: Microsoft.SqlServer.Types (w Microsoft.SqlServer.Types.dll)
Składnia
'Deklaracja
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function STGeometryN ( _
n As Integer _
) As SqlGeography
'Użycie
Dim instance As SqlGeography
Dim n As Integer
Dim returnValue As SqlGeography
returnValue = instance.STGeometryN(n)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlGeography STGeometryN(
int n
)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public:
SqlGeography^ STGeometryN(
int n
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member STGeometryN :
n:int -> SqlGeography
public function STGeometryN(
n : int
) : SqlGeography
Parametry
- n
Typ: System.Int32
Int wyrażenie między 1 a liczbą SqlGeography wystąpień w GeometryCollection.
Wartość zwracana
Typ: Microsoft.SqlServer.Types.SqlGeography
A SqlGeography element z określonego wystąpienie w GeometryCollection.
Uwagi
Gdy ta metoda jest używana na podtypem GeometryCollection, takich jak MultiPoint lub MultiLineString, metoda zwraca SqlGeography wystąpienie Jeśli wywołana z N = 1.
Metoda ta zwraca null, jeśli parametr jest większy niż wynik STNumGeometries i będzie zgłosić ArgumentOutOfRangeException, jeśli parametr wyrażenie jest mniejsza niż 1.