Entries from August 2007

Convert a int[] to string[]

Date August 7, 2007

This morning I needed to convert an array of integers to strings and I stumbled across this nice little Array.ConvertAll generics method. My example is quite simple, but this technique could be used for much more complicated explicit casting. 1 2 3 4 5 6 7 int[] values = new int[]{1,2,3,4,5}; string[] strValues = Array.ConvertAll(values, [...]