Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading a text file into a string?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01205023
Message ID:
01205114
Vues:
13
How about:
System.IO.File.ReadAllText(@"C:\myfile.txt");
It is a nice static method (I think it has an overload for encoding). It was introduced in 2.0. The File class got quite a few new methods in 2.0 both for reading and writing stuff.
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform