da aggiungere il namespace
using System.IO;

occorre creare l'oggetto perché i metodi non sono static