My friend always tells me that if we declare something as "public", then it is dangerous, because then any program can access this memory and that the solution should use the "private" access modifier.
I am wondering if this is true.
This is not , in fact, true.
. , , .
public private (, ) . . Windows , / ( ) , (, ) . , Windows , #. API-, ; .
public
private
, ring-0 , , .
C # modifiers do not affect memory addressing - the processor and OS architecture control this.