Archive

Archives pour la catégorie ‘Codes’

Convert ArrayList to String

09/09/2009 Aucun commentaire

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 1925

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 1925

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 2290

Warning: implode() [function.implode]: Argument must be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3242

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3265

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3265

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3306

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3357

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3357

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3502

Warning: Invalid argument supplied for foreach() in /home/content/b/a/n/bananimation/html/bj/wp-content/plugins/devformatter/geshi/geshi.php on line 3502

  |  copy code |? 
01
public string ArrayListToString(System.Collections.ArrayList ar)
02
     {
03
          return ArrayListToString(ar, ',');
04
     }
05
public string ArrayListToString(System.Collections.ArrayList ar, char delim)
06
     {
07
          return ArrayListToString(ar, delim.ToString());
08
     }
09
public string ArrayListToString(System.Collections.ArrayList ar, string delim)
10
     {
11
          return string.Join(delim, (string []) ar.ToArray(typeof(string)));
12
     }

Categories: Codes Tags: , ,