اسماعیل ابراهیمی
دوشنبه 12 دی 1390, 23:22 عصر
سورس کد خواندن تمام خطوط یک فایل و قرار دادن در آرایه
using System; namespace PlayingAround { class ReadAll { public static void Main(string[] args) { string[] lines = System.IO.File.ReadAllLines(@"C:\t1"); Console.Out.WriteLine("contents = " + lines.Length); Console.In.ReadLine(); } } }
using System; namespace PlayingAround { class ReadAll { public static void Main(string[] args) { string[] lines = System.IO.File.ReadAllLines(@"C:\t1"); Console.Out.WriteLine("contents = " + lines.Length); Console.In.ReadLine(); } } }