button_click event { using (FileStream ar1=File.OpenRead(FINAL.TXT)) { using (TextReader ART1 =new StreamReader(ar1)) { int i; for (i = 0; i < 6; i++) { array1[i] = Convert.ToInt32(ART1.Read()); listBox1.Items.Add(Convert.ToInt32(array1[i])); } } } }
using (StreamReader reader1 = File.OpenText(@"final.txt")) { do { char next = (char)reader1.Read(); Console.WriteLine(next); } while(!reader1.EndOfStream); }
string theFileContentsAsString = File.ReadAllText("final.txt"); int[] theStringAsArray = theFileContentsAsString.ToCharArray().Select(c => Convert.ToInt32(c.ToString())).ToArray(); //bind theStringArray to listbox here
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)