Register custom generic method to report designer

Hallo,

I want to register a custom genric method to the report designer control.

public static class Functions
{
    public static T Iif<T>(bool condition, T part1 , T part2) => (condition ? part1: part2);
}  

If i register this method with

RegisteredObjects.AddFunction(..);

ther is an error when I use this method in the report designer

The type or namespace name 'T' could not be found (are you missing a using directive or an assembly reference?)

Why isn't it possible to use the T Type ?

I hope somebody is able to help me with it.

Leave a Comment