GeographyOperationsExtensions.Distance 方法
确定地理距离。
命名空间: System.Spatial
程序集: System.Spatial(在 System.Spatial.dll 中)
语法
声明
<ExtensionAttribute> _
Public Shared Function Distance ( _
operand1 As Geography, _
operand2 As Geography _
) As Nullable(Of Double)
用法
Dim operand1 As Geography
Dim operand2 As Geography
Dim returnValue As Nullable(Of Double)
returnValue = operand1.Distance(operand2)
public static Nullable<double> Distance(
this Geography operand1,
Geography operand2
)
[ExtensionAttribute]
public:
static Nullable<double> Distance(
Geography^ operand1,
Geography^ operand2
)
static member Distance :
operand1:Geography *
operand2:Geography -> Nullable<float>
public static function Distance(
operand1 : Geography,
operand2 : Geography
) : Nullable<double>
参数
- operand1
类型:System.Spatial.Geography
第一个操作数。
- operand2
类型:System.Spatial.Geography
第二个操作数。
返回值
类型:System.Nullable<Double>
操作结果。
用法说明
在 Visual Basic 和 C# 中,您可以对 Geography 类型的任何对象将此方法作为实例方法调用。在您使用实例方法语法调用此方法时,将忽略第一个参数。有关详细信息,请参阅https://msdn.microsoft.com/zh-cn/library/bb384936(v=vs.103)或https://msdn.microsoft.com/zh-cn/library/bb383977(v=vs.103)。