Convert String array To Int Array - CSharp System

CSharp examples for System:Array Convert

Description

Convert String array To Int Array

Demo Code


using System.Windows.Forms;
using System.Globalization;
using System;/*  w w  w. j av  a2s.c o m*/

public class Main{
        public static int[] ToIntArray(string[] strArray)
        {
            return Array.ConvertAll(strArray, intParameter => int.Parse(intParameter.ToString(CultureInfo.InvariantCulture)));
        }
}

Related Tutorials