Ecrire dans un fichier texte en C#

// Example #1: Write an array of strings to a file. // Create a string array that consists of three lines. string[] lines = { « First line », « Second line », « Third line » }; // WriteAllLines creates a file, writes a collection of strings to the file, // and then...

Lire un fichier texte en C#

// Exemple #1 // Lire le fichier et l’affecter dans une variable… string text = System.IO.File.ReadAllText(@ »C:\Users\Public\DossierTest\File.txt »); System.Console.WriteLine(« Contenu de File.txt = {0} », text); // Exemple #2 // Mettre chaque ligne dans...

Comment manipuler un DataGridView en C#

Comment manipuler un DataGridView en C# // Définir le nombre de colonnes … dataGridView1.ColumnCount = 3; // Pour Nommer les colonnes … dataGridView1.Columns[0].Name = « Colonne NOM »; dataGridView1.Columns[1].Name = « Colonne PRENOM »;...

Connexion OleDB à HyperFile Classic en C#

Exemple de connexion à Hyperfile Classic en C# avec OleDB using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using...