Friday, February 7, 2014

How to add two string arrays in C#

  string[] ordstatus = orderstatus.Split(',');
            string[] filproductstatus = productstatus.Split(',');

            string[] orderproductstatus = new string[ordstatus.Length + filproductstatus.Length];
            Array.Copy(ordstatus, orderproductstatus, ordstatus.Length);
            Array.Copy(filproductstatus, 0, orderproductstatus, ordstatus.Length, filproductstatus.Length);