Question File Accessibility

What folder a source file is stored in is irrelevant once the application is compiled. You access the class defined in that the same way you access any class defined in your project. Perhaps what is confusing you is the fact that C# uses the path of the source file as the namespace of the class. If you add Form1 to the root of the MyApplication project then the class is MyApplication.Form1. If you add Form1 to the MyFolder folder in the MyApplication project then the class will be MyApplication.MyFolder.Form1. You can accept those default namespaces or, if you want, you can go into the code file and change the namespace so that all classes are members of the project root namespace again.

By the way, in future, please make it easier on yourself and us and simply attach your image to your post. That way we can see it without having to open extra windows and navigating to external sites.

Latest posts

Top Bottom