QueryBuilder.AverageByNullable<'T,'Q,^Value> 方法 (F#)

选择每个元素可以为 null 值的查询运算符选择到目前为止,并返回这些平均值。 如果有可以为 null,可不具有值,它将被忽略。

Namespace/Module Path:Microsoft.FSharp.Linq

程序集:FSharp.Core(在 FSharp.Core.dll 中)

// Signature:
member this.AverageByNullable : QuerySource<'T,'Q> * ('T -> Nullable<^Value>) -> Nullable<^Value> when ^Value with static member (+) and ^Value with static member DivideByInt and ^Value with static member Zero and ^Value : (new : unit ->  ^Value) and ^Value : struct and ^Value :> ValueType

// Usage:
queryBuilder.AverageByNullable (source, projection)

参数

  • source
    类型:QuerySource<'T,'Q>

    在查询。

  • projection
    类型:'T -> Nullable<T><^Value>

    计算每个元素的值的函数。

返回值

这意味着。

备注

Null值不会影响该平均值。

有关更多信息和示例,请参见 查询表达式(f#)

平台

Windows 8,Windows 7,Windows server 2012中,Windows server 2008 R2

版本信息

F#核心库版本

支持:4.0,可移植

请参见

参考

Linq.QueryBuilder 类 (F#)

Microsoft.FSharp.Linq 命名空间 (F#)

hh225374(v=vs.110).md