5

I use C# 8 nullable reference types.

I have a generic class that might accept nullable reference type as a type parameter.

Is there a way to declare non-nullable type based on generic type parameter that might be nullable reference type (or even Nullable struct)?

abstract class Selector<T>
{
    T SelectedItem;

    // how to make item parameter not nullable?
    abstract string Format(T! item);

    // how to make item parameter not nullable?
    Func<T!, string> FormatFunction;
}