ArrayUtil.cs 474 B

1234567891011121314151617181920
  1. using System.Collections.Generic;
  2. namespace GFGGame
  3. {
  4. public class ArrayUtil<T>
  5. {
  6. public static string JoinArrayToString(T[] array)
  7. {
  8. string result = "";
  9. foreach(object i in array)
  10. {
  11. result += i.ToString() + ",";
  12. }
  13. if(result.Length > 0)
  14. {
  15. result = result.Substring(0, result.Length - 1);
  16. }
  17. return result;
  18. }
  19. }
  20. }