2010-02-10 5 views

Répondre

14

La méthode ReadAllText attend un argument de nom de fichier de type chaîne et non FileInfo:

string contents = File.ReadAllText(filex.FullName); 
3

Essayez:

string contents = File.ReadAllText(filex.FullName); 
+0

Je pense que vous voulez FullName au lieu de FullPath – jjxtra

0

File.ReadAllT ext n'accepte pas FileInfo en tant que paramètre. Utilisez à la place:

String contents = File.ReadAllText(filex.FullName); 
Questions connexes