EdmFunctions.Round 方法

定義

建立會叫用標準 'Round' 函式的 DbFunctionExpression

多載

Round(DbExpression)

建立會使用指定引數叫用標準 'Round' 函式的 DbFunctionExpression,其中的引數都必須具有單精度浮點數、雙精度浮點數或十進位結果型別。 表達式的結果類型與的結果類型 value相同。

Round(DbExpression, DbExpression)

建立會使用指定引數叫用標準 'Round' 函式的 DbFunctionExpression,其中的引數必須具有單精度浮點數、雙精度浮點數或十進位,以及整數結果型別。 表達式的結果類型與的結果類型 value相同。

Round(DbExpression)

建立會使用指定引數叫用標準 'Round' 函式的 DbFunctionExpression,其中的引數都必須具有單精度浮點數、雙精度浮點數或十進位結果型別。 表達式的結果類型與的結果類型 value相同。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Round(System::Data::Common::CommandTrees::DbExpression ^ value);
public static System.Data.Common.CommandTrees.DbFunctionExpression Round (this System.Data.Common.CommandTrees.DbExpression value);
static member Round : System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Round (value As DbExpression) As DbFunctionExpression

參數

value
DbExpression

運算式,指定要進位的數值。

傳回

將指定引數捨入至最接近之整數值的新 DbFunctionExpression。

例外狀況

valuenull

value 無效。

適用於

Round(DbExpression, DbExpression)

建立會使用指定引數叫用標準 'Round' 函式的 DbFunctionExpression,其中的引數必須具有單精度浮點數、雙精度浮點數或十進位,以及整數結果型別。 表達式的結果類型與的結果類型 value相同。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Round(System::Data::Common::CommandTrees::DbExpression ^ value, System::Data::Common::CommandTrees::DbExpression ^ digits);
public static System.Data.Common.CommandTrees.DbFunctionExpression Round (this System.Data.Common.CommandTrees.DbExpression value, System.Data.Common.CommandTrees.DbExpression digits);
static member Round : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Round (value As DbExpression, digits As DbExpression) As DbFunctionExpression

參數

value
DbExpression

運算式,指定要進位的數值。

digits
DbExpression

運算式,指定進位時要使用的精確位數。

傳回

新的 DbFunctionExpression,會將指定的自變數四捨五入為最接近的整數值,有效位數如 所 digits指定。

例外狀況

valuedigitsnull

valuedigits 無效。

適用於