I program in C and now I decided to break into the world of OOP by C # language. I see that many people talk about security and that's just my doubt, when programming I see that the development environment itself limits my access to private classes as well as their attributes and methods. When I define this class as public everything that belongs to it is accessible within other classes.
1 ° Define as private
a class protects the programmer's code or the user's application?
2 ° If I access attributes and methods of a class A in a class B, am I jeopardizing application security?
If someone can also give me some tips related to the organization of the code, I'll be grateful because I'm used to C so I always modularize my code separated by 2 headers (functions and libraries) and 1 .c
where I call all functions. Since in C # it has the advent of classes and security:
3 ° What would be the best way to organize everything in different scripts securely?