次の方法で共有


DbGeography.Distance メソッド

[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]

この DbGeography 値と別の DbGeography 値内の最も近いポイント間の距離を計算します。

名前空間:  System.Data.Entity.Spatial
アセンブリ:  EntityFramework (EntityFramework.dll 内)

構文

'宣言
Public Function Distance ( _
    other As DbGeography _
) As Nullable(Of Double)
'使用
Dim instance As DbGeography 
Dim other As DbGeography 
Dim returnValue As Nullable(Of Double)

returnValue = instance.Distance(other)
public Nullable<double> Distance(
    DbGeography other
)
public:
Nullable<double> Distance(
    DbGeography^ other
)
member Distance : 
        other:DbGeography -> Nullable<float> 
public function Distance(
    other : DbGeography
) : Nullable<double>

パラメーター

戻り値

型 : System.Nullable<Double>
この geography 値と other で最も近い 2 点間の距離を指定する double 値。

参照

参照

DbGeography クラス

System.Data.Entity.Spatial 名前空間