DbGeometry.Distance Method (DbGeometry)

 

Computes the distance between the closest points in this DbGeometry value and another DbGeometry value.

Namespace:   System.Data.Entity.Spatial
Assembly:  EntityFramework (in EntityFramework.dll)

public Nullable<double> Distance(
	DbGeometry other
)

Parameters

other
Type: System.Data.Entity.Spatial.DbGeometry

The geometry value for which the distance from this value should be computed.

Return Value

Type: System.Nullable<Double>

A double value that specifies the distance between the two closest points in this geometry value and other.

Exception Condition
ArgumentNullException

other is null.