• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2324
  • Last Modified:

What are the benefits of using internal vs. private or vice versa

The reason I ask is that I realized that I can use internal on constants and Win32 imports and was wondering the actual difference between the two and benefits of each.
1 Solution
Gautham JanardhanCommented:
internal variable/methods can be accesed by objects in the same assembly.
while private is only acessible in the same class.
ammotroopAuthor Commented:
Thanks for the info.  That actually makes a lot of sense.  I will now have to start using internal on a lot of applications where I had originally made variables static.  But, I think that internal would actually suit my needs better.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now