Hi Team, I am having troubles with translating working code in Visual Studio to Invoke code in UiPath.
I am trying to set up a method for checking file name (input) in zip folder (input) and if it’s there, return true, if not - false (output arg)
This is my code:
public bool ReturnZipName (string fileName, string folderName)
{
using (ZipArchive archive = ZipFile.OpenRead(folderName))
{
foreach (ZipArchiveEntry entry in archive.Entries)
{
if (entry.Name == fileName)
{
return true;
}
}
return false;
}
}
zipFileFound = ReturnZipName(@"FinInvoiceRegisters_20190617193130.csv", @"C:\Users\emea_svc_ibot_bsot01\OneDrive - CBRE, Inc\Documents\UiPath\ES_PMA_APInvoice\Testing\c# test\11_Transfer_20190617_193130.zip");
This is list of my arguments
This is the errors I am getting:
test.xaml: No compiled code to run
error CS1513: } expected At line -1
error CS1519: Invalid token '=' in class, struct, or interface member declaration At line 18
error CS1520: Method must have a return type At line 18
error CS1031: Type expected At line 18
error CS1022: Type or namespace definition, or end-of-file expected At line 20
Can anyone help?

