I have an array of files, and I need to get the path string of one. I can't find any method that does it. What the code does is go through two file directories, and then look for the first file in the source directory in the destination directory. This is my code so far, the questions indicate the question I have:
for (int i = 0;i<fileDirOrigenNames.Length;i++ )
{
System.IO.Stream[] arrayOrigen = new System.IO.Stream[i];
for (int j = 0; j <= fileDirDestinoNames.Length; j++)
{
System.IO.Stream[] arrayDestino = new System.IO.Stream[i];
if (arrayOrigen[i].Equals(arrayDestino[j]) == true)
{
//??????? mostrarResultadoComparacionPropiedades(arrayOrigen[i].ToString, arrayDestino[j].ToString);
}
}
}
Of course the code does not do what you intend, although I do not know if I have understood correctly what you are trying to do.
If what you want is to check if the files of the source path exist in the destination path, here is an example of a method that does it.
This code compares the files only by name, if you want to check the content you would have to complicate it a little more:
The way you're doing it is fine, the problem is that you're missing the parentheses in the
ToString
: