The name ‘Directory’ or ‘File’ does not exist in the current context

The name ‘Directory’ does not exist in the current context

The name ‘File’ does not exist in the current context

I have a Solution Is Like Below.

When this type of error occure,so you simply add below namespace.
you use System.IO; namespace at the top of the class().
And also with other namespace declarations.

Hope your problem has been solved.

About the Author

avatar