// Load Log File var_LogFileContent = ""; // string line; int counter = 0; // List<string> list = new List<string>(); if (File.Exists(var_FileName)) { // Read file // var_LogFileContent = File.ReadAllText(var_FileName); System.IO.StreamReader file = new System.IO.StreamReader(var_FileName); while ((line = file.ReadLine()) != null) { // System.Console.WriteLine(line); list.Add(line); counter++; } file.Close(); // var_LogStringArray = list.ToArray(); // richTextBox_LoadFile.Text = var_LogFileContent; } richTextBox_LoadFile.AppendText("Lines: " + counter.ToString() + "\n");