7
I’m in trouble in my controller
the moment I start a file deletion routine.
I am using the method File.Delete()
, but he simply does not recognize and returns me the following warning:
Cannot Choose method from method group. Did you intend to invoke the method?
Follow the code too:
public void Delete(String id)
{
//Função que busca o meu arquivo de delete
var modelArquivo = BuscaArquivo(id);
//Aqui se atribue o nome completo do arquivo
var nomeArquivo = modelArquivo.NomeArquivoCompleto;
//Aqui da-se a advertência citada acima
File.Delete(nomeArquivo);
}
Any idea what’s going on?