Cookie Consent by Free Privacy Policy Generator Polipone
<febbraio 2026>
lunmarmergiovensabdom
2627282930311
2345678
9101112131415
16171819202122
2324252627281
2345678
Per leggere un file di testo, una riga alla volta, il modo più semplice è usare l'oggetto StreamReader (del namespace System.IO)


        string nomeFile = @"c:\temp\file.txt";
        using (StreamReader sr = new StreamReader(nomeFile))
        {
            while (!sr.EndOfStream)
            {
                string myLine = sr.ReadLine();
            }
        }
Tutor On-Line
Ciao, sono il tuo Tutor on-line. Come posso aiutarti? 18:59

Notifiche