判斷幾何距離。
命名空間: System.Spatial
組件: System.Spatial (在 System.Spatial.dll 中)
語法
'宣告
<ExtensionAttribute> _
Public Shared Function Distance ( _
operand1 As Geometry, _
operand2 As Geometry _
) As Nullable(Of Double)
'用途
Dim operand1 As Geometry
Dim operand2 As Geometry
Dim returnValue As Nullable(Of Double)
returnValue = operand1.Distance(operand2)
public static Nullable<double> Distance(
this Geometry operand1,
Geometry operand2
)
[ExtensionAttribute]
public:
static Nullable<double> Distance(
Geometry^ operand1,
Geometry^ operand2
)
static member Distance :
operand1:Geometry *
operand2:Geometry -> Nullable<float>
public static function Distance(
operand1 : Geometry,
operand2 : Geometry
) : Nullable<double>
參數
- operand1
型別:System.Spatial.Geometry
第一個運算元。
- operand2
型別:System.Spatial.Geometry
第二個運算元。
傳回值
型別:System.Nullable<Double>
運算結果。
使用注意事項
在 Visual Basic 及 C# 中,您可以在任何型別 Geometry 的物件上將這個方法做為執行個體方法呼叫。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=vs.103) 或 https://msdn.microsoft.com/zh-tw/library/bb383977(v=vs.103)。