theraot / Theraot

Backporting .NET and more: LINQ expressions in .net 2.0 - nuget Theraot.Core available.
MIT License
159 stars 30 forks source link

StringEx.Join skips nulls #169

Closed NN--- closed 2 years ago

NN--- commented 2 years ago

The code has invalid check for null: https://github.com/theraot/Theraot/blob/master/Framework.Core/System/StringEx.join.cs#L22

https://dotnetfiddle.net/Widget/fZrbN2

using System;

public class Program
{
    public static void Main()
    {
        Console.WriteLine(string.Join(",", new[]{"a","b",null}));
    }
}
a,b,
NN--- commented 2 years ago

Fixed.