public static void NotNullOrEmpty()

in src/Microsoft.VisualStudio.Validation/Requires.cs [254:268]


        public static void NotNullOrEmpty<T>([ValidatedNotNull, NotNull] ICollection<T> values, string? parameterName)
        {
            // To whoever is doing random code cleaning:
            // Consider the performance when changing the code to delegate to NotNull.
            // In general do not chain call to another function, check first and return as earlier as possible.
            if (values is null)
            {
                throw new ArgumentNullException(parameterName);
            }

            if (values.Count == 0)
            {
                throw new ArgumentException(Format(Strings.Argument_EmptyArray, parameterName), parameterName);
            }
        }