Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Distance Method (DbGeography, DbGeography)
Collapse the table of content
Expand the table of content

DbSpatialServices.Distance Method (DbGeography, DbGeography)

.NET Framework 4.6 and 4.5

Computes the distance between the closest points in two DbGeography values.

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

public abstract double Distance(
	DbGeography geographyValue,
	DbGeography otherGeography
)

Parameters

geographyValue
Type: System.Data.Spatial.DbGeography

The first geography value.

otherGeography
Type: System.Data.Spatial.DbGeography

The second geography value.

Return Value

Type: System.Double
A double value that specifies the distance between the two closest points in geographyValue and otherGeography.

ExceptionCondition
ArgumentNullException

geographyValue otherGeography

ArgumentException

geographyValue otherGeography

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft