diff --git a/TUnit.Core/Attributes/TestData/MatrixDataSourceAttribute.cs b/TUnit.Core/Attributes/TestData/MatrixDataSourceAttribute.cs index 503c90f249..187cc03604 100644 --- a/TUnit.Core/Attributes/TestData/MatrixDataSourceAttribute.cs +++ b/TUnit.Core/Attributes/TestData/MatrixDataSourceAttribute.cs @@ -206,12 +206,8 @@ private bool IsExcluded(object?[] exclusion, object?[] rowArray) if (resolvedType.IsEnum) { -#if NET5_0_OR_GREATER var enumValues = Enum.GetValuesAsUnderlyingType(resolvedType) .Cast(); -#else - var enumValues = Enum.GetValues(resolvedType).Cast(); -#endif if (isNullable) {