c# identifier expected?

You did not give type identifiers to your argument list here

static void RecursiveCopy(origDir, destDir)

should be

static void RecursiveCopy(string origDir, string destDir)

Your method RecursiveCopy has two parameters listed without their types. It should be this:

static void RecursiveCopy(string origDir, string destDir)

Here is your problem:

static void RecursiveCopy(origDir, destDir)

You don't specify the types for the parameters, perhaps you intended the following:

static void RecursiveCopy(string origDir, string destDir)

There are more issues however that I've noticed. It's possible you're still working on these, but from what you've posted:

  • You never call your RecursiveCopy method. Perhaps you meant to call it from Main() instead of declaring an overload with two parameters?

  • You declare two public fields origDir and destDir but then never use them. Instead you create two local variables in RecursiveCopy() and use these instead. Did you intend to create parameters or use the public fields instead?

  • Your copy is not actually true to its name of "recursive".

Tags:

C#