theraot / Theraot

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

StringEx.Join skips nulls #169

Closed NN--- closed 3 years ago

NN--- commented 3 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 3 years ago

Fixed.