using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace Exemple2 { class Program {/*Enoncé: Exemple d'écriture dans un fichier*/ static void Main(string[] args) { StreamWriter fichier = new StreamWriter("E:\\Chapitre9\\ExempleWrite.txt",true); int[] vals = { 2, 3, 5, 7, 11 }; for (int j = 0; j < 1000000; j++) for (int i = 0; i < vals.Length; ++i) { fichier.WriteLine("{0} - {1}",j,vals[i]); } fichier.Close(); Console.Read(); } } }