C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
Today
    Last 7 Days more...






    Forums » .NET » .NET »

    internal keyword


    Posted Date: 03 Jul 2009      Posted By: Sathish S      Member Level: Bronze     Points: 1   Responses: 5



    hi

    What is use of internal keyword





    Responses

    Author: anish varghese    03 Jul 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

    Internal keyword is used to access inside the same assembly
    public class BaseClass
    {
    // Only accessible within the same assembly
    internal static int x = 0;
    }



    Author: Abhinav Dawra    03 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

    You might me interested in something which is called
    protected internal which combines the features of both protected and internal.

    Anything which is protected internal will be accessible in both the same assembly and also in any class derived from the base class.

    Thanks,
    Abhinav
    Please rate if this answer was useful



    Author: ABitSmart    03 Jul 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

    The USE of internal keyword is to restrict data to your assembly i.e. if you have a class which you need to use as public in your DLL only and not visible to assembly outside the DLL then you will make it internal. In this way, the class can act as public and accessible to everyone in the DLL but no one outside will be able to use it, for them the class will behave private.

    Kind regards,
    ABitSmart
    DNS Web-master, DNS MVM
    My blog
    Thoughts.exe



    Author: shankar v    03 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

    The internal keyword is an access modifier for types and type members. Internal types or members are accessible only within files in the same assembly, as in this example:

    public class BaseClass
    {
    // Only accessible within the same assembly
    internal static int x = 0;
    }

    Regards & Thanks
    Shankar V
    www.teaminnovative.in



    Author: Krishnaveni    04 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

    Internal keyword is one of the access specifier available in .Net framework , that makes a type visible in a? given assembly , for e.g : a single dll can contain multiple modules , essentially a multi file assembly , but it forms a single binary component , so any type with internal keyword will be visible throughout the assembly and can be used in any of the modules .


    Post Reply

     This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.


    Next : Listview small probs
    Previous : How to create -- very very urgent
    Return to Discussion Forum
    Post New Message
    Category: .NET

    Related Messages



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use