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

Posted on 2007-08-04
Last Modified: 2008-01-09
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.
Question by:ammotroop
    LVL 29

    Accepted Solution

    internal variable/methods can be accesed by objects in the same assembly.
    while private is only acessible in the same class.
    LVL 1

    Author Comment

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now