DbSpatialServices.GetArea 方法 (DbGeography)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
傳回可為 Null 的雙精度浮點數值,指出指定的 DbGeography 值的範圍,如果該值不代表表面,就可能為 null。
命名空間: System.Data.Entity.Spatial
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public MustOverride Function GetArea ( _
geographyValue As DbGeography _
) As Nullable(Of Double)
'用途
Dim instance As DbSpatialServices
Dim geographyValue As DbGeography
Dim returnValue As Nullable(Of Double)
returnValue = instance.GetArea(geographyValue)
public abstract Nullable<double> GetArea(
DbGeography geographyValue
)
public:
virtual Nullable<double> GetArea(
DbGeography^ geographyValue
) abstract
abstract GetArea :
geographyValue:DbGeography -> Nullable<float>
public abstract function GetArea(
geographyValue : DbGeography
) : Nullable<double>
參數
- geographyValue
類型:System.Data.Entity.Spatial.DbGeography
地理位置值,不需要代表表面。
傳回值
類型:System.Nullable<Double>
可為 null 的雙精度浮點數值,表示所指 DbGeography 值的面積。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | geographyValue 為 null。 |
ArgumentException | geographyValue 與此空間服務實作不相容。 |