You can apply this method to a sequence of arbitrary values if you provide a function, selector, that projects the members of source into a numeric type, specifically Nullable<Single> in C# or Nullable(Of Single) in Visual Basic.

In Visual Basic query expression syntax, an Aggregate Into Sum() clause translates to an invocation of Sum.

This code example uses an overload of this overloaded method that is different from the specific overload that this topic describes. To extend the example to this topic, change the body of the selector function.