mardi 14 avril 2020

How to check if a text file is empty c#

How do I write an if statement to check if my text file is empty? The if statement below doesn't work for text files.

if( new FileInfo( "file" ).Length == 0 )
{
  //Is empty
}

Aucun commentaire:

Enregistrer un commentaire