Generic Constraint for Non Nullable types May 14, 2023 by Tarik From C# 8.0 you can now use the where T : notnull generic constraint to specificy T is a non-nullable type.