Nope there is no need to keep them public, as there won't be any other application or assembly accessing those members.
Though there is a model in .NET Websites where every webform is compiled as a separate dll, there if you have to call even another webform, it has to be public but its very unusual (infact bad design) to make call to another webforms member from any webform.
Main Topics
Browse All Topics





by: JimBrandleyPosted on 2009-01-16 at 13:41:05ID: 23397696
brettr - Usually, members are made private to the class. However, either type of application can use multiple assemblies. If you have a class in one assembly, and a class in another assembly needs to reference a member of the first class, the property that exposes that member needs to be made public. If that's not the case, you can make it either internal, to limit the access to other classes in the assembly, or private to limit access to that class.
Jim