Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Is it possible to inherit internal class to a public Class
on creating a class library
Posted

1 solution

Your base class can't be less accessible then your derived class.
So you can't inherit a internal class to a public class.

VALID CASE:
public class Base
    {

    }

   internal class Derived : Base
    {

    }




INVALID CASE:
internal class Base
    {

    }

    public class Derived : Base
    {

    }
 
Share this answer
 
v2
Comments
amit sahu20 16-Aug-10 2:14am    
thanx,
then pls let me know, what will be the use of internal class in class library(any real time eg)
PSK_ 16-Aug-10 2:42am    
When you are developing a class library that can be used by some other application in that case your public classes needs some helper classes that are not relevant for outside world such classes you make internal.
amit sahu20 16-Aug-10 4:30am    
thanx a lot
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900