I am developing a class where some methods will not do any harm if they are published as public. But they can be private, as they will be used from only one class in my project.
Publishing these features has the following advantages:
Private users have the following advantages:
What are the general guidelines in this case?
, , Ch. 06 of Code Complete 2 Steve McConnell, . .
, "Persona" , . . , , .
, .
, +1 John sanders.
, CC2.
, Satckoverflow? (.)
.
, InternalsVisibleTo AssemblyInfo.cs, unit test .
InternalsVisibleTo
, , (, ). API ( ).
, . , .
. , .
, , . .
, . .
! .
, , . , , , . , api, api , , , api.
, . , accessors Visual Studio 2005 2008, api . unit test, - api, , .
, , api . , .. unit test, , api , , .