Forrás:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace ConsoleApp3 { internal class Program { static void Main(string[] args) { string[] sorok= File.ReadAllLines("diszek.txt"); int[] napok = new int[sorok.Length]; int[] elha = new int[sorok.Length]; int[] eladha= new int[sorok.Length]; int[] elangy= new int[sorok.Length]; int[] eladangy = new int[sorok.Length]; int[] elkfe=new int[sorok.Length]; int[] eladfe=new int[sorok.Length]; string[] darabol = new string[7]; for (int i = 0; i < sorok.Length; i++) { darabol = sorok[i].Split(';'); napok[i] =Convert.ToInt32( darabol[0]); elha[i] = Convert.ToInt32(darabol[1]); eladha[i] = Convert.ToInt32(darabol[2]); elangy[i] = Convert.ToInt32(darabol[3]); eladangy[i] = Convert.ToInt32(darabol[4]); elkfe[i] = Convert.ToInt32(darabol[5]); eladfe[i] = Convert.ToInt32(darabol[6]); } for (int i = 0; i < elha.Length; i++) { Console.WriteLine(elha[i]); } Console.ReadLine(); } } }