How to Merge Array in C#

  1. void mergeArrayExample()  
  2.     {  
  3.         string[] Arr1 = { "a""b""c""d" };  
  4.         string[] Arr2 = { "d""e""f" };  
  5.         string[] Arr3 = { "d""e""f" };  
  6.         int intlength = Arr1.Length;  
  7.         int destinationIndex = Arr2.Length;  
  8.   
  9.         Array.Resize(ref Arr2, Arr1.Length + Arr2.Length + Arr3.Length);  
  10.         Array.Copy(Arr1, 0, Arr2, destinationIndex, intlength);  
  11.         destinationIndex = intlength + destinationIndex;  
  12.         intlength = Arr3.Length;  
  13.   
  14.         Array.Copy(Arr3, 0, Arr2, destinationIndex, intlength);  
  15.         Array.Sort(Arr2);  
  16.     }