Does a variable declare as "private" in C # to protect memory in windows from access using a memory scanner?

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.

+5
source share
3 answers

This is not , in fact, true.

. , , .

+9

public private (, ) . . Windows , / ( ) , (, ) . , Windows , #. API-, ; .

, ring-0 , , .

+2

C # modifiers do not affect memory addressing - the processor and OS architecture control this.

-1
source

All Articles