teknologi-umum / pehape

PHP itu bukan pemberi harapan palsu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C#: Support imploding nested array

ronnygunawan opened this issue · comments

var arr = new[] { new [] { 1, 2, 3, 4, 5 } };
var str = PHP.Implode("+", arr);

Expected output:

str should be "1+2+3+4+5"

Hello you should be able to use String.Join() to get the same functionality.

string[] arr = new string[]
            {
                "1",
                "2",
                "3",
                "4"
            };

            var str = (String.Join("+", arr));

            Console.Write(str); 
            Console.ReadKey();