New to Telerik UI for WinFormsStart a free 30-day trial

Extension methods for the AggregateValue class.

Definition

Namespace:Telerik.Pivot.Core

Assembly:Telerik.WinControls.PivotGrid.dll

Syntax:

C#
public static class AggregateValueExtensions

Inheritance: objectAggregateValueExtensions

Methods

Check if any of the AggregateValues contains error.

C#
public static bool ContainsError(this IEnumerable<AggregateValue> aggregateValues)
Parameters:aggregateValuesIEnumerable<AggregateValue>Returns:

bool

Convert the given aggregate value to specified type.

C#
public static T ConvertOrDefault<T>(this AggregateValue aggregateValue)
Parameters:aggregateValueAggregateValue

The aggregate value to convert.

Returns:

T

The value associated, if conversion is possible; otherwise, the default value for the type of the value parameter.

Check if the value of the AggregateValue is error.

C#
public static bool IsError(this AggregateValue aggregateValue)
Parameters:aggregateValueAggregateValue

The aggregate value to check.

Returns:

bool

True if the actual value is AggregateError, otherwise false.

Tries to convert the given aggregate value to specified type.

C#
public static bool TryConvertValue<T>(this AggregateValue aggregateValue, out T value)
Parameters:aggregateValueAggregateValue

The aggregate value to convert.

valueT

When this method returns, contains the value associated, if conversion is possible; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns:

bool

True if conversion succeeded, otherwise false.