GeometryOperationsExtensions.Distance 方法
确定几何距离。
命名空间: 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-cn/library/bb384936(v=vs.103)或https://msdn.microsoft.com/zh-cn/library/bb383977(v=vs.103)。