Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
This may sound, or actually may be a pretty newbie and simply question, but this is something i just figured out and cant seem to deal with.

I have a compiled WinForm application, and if i create a new project and add a reference to the compiled assembly (not the project, but the actual .exe file) i still can list from design-time all its forms and classes and access all their methods.

Of course, i cannot access the methods i have declared as private, but still, i can access for example my frmMain and all it settings, and basically list all the classes and forms that the assembly has.

is there any way to prevent this? why i cannot declare my forms as private and just hide them from being exposed in such way?
Posted

1 solution

Within a project you can access everything that is not set to private this is by design.

To overcome this you can partition your application into projects and/or precompile them and use the DLL assemblies.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900