Convert int Array To String Array - CSharp System

CSharp examples for System:Array Convert

Description

Convert int Array To String Array

Demo Code


using System;//  www.  jav a2  s . c o  m

public class Main{
        /// <summary>
        /// 
        /// </summary>
        /// <param name="src"></param>
        /// <returns></returns>
        public static string[] ToStrArr(this int[] src)
        {
            return Array.ConvertAll(src, i => i.ToString());
            // return Array.ConvertAll<int, string>(src, new Converter<int, string>(toString));
        }
        private static string toString(int src) { return src.ToString(); }
}

Related Tutorials