Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we inherit a private class in chsarp? how? explain(with
code) ?

Answer Posted / manish

PRIVATE CLASS CAN BE INHERITTED ... REMEMBER INNER CLASS
CONCEPTS ,,,

PLEASE SEE THE CODE BELOW

public class OuterKing
{
public int i;

/// <summary>
/// PRIVATE BASE CLASS
/// </summary>
private class InnerJack
{
public InnerJack()
{
MessageBox.Show ("Private
class InnerJack Base Constructor");
}
public static int j =5;
public static void display()
{
MessageBox.Show (j.ToString
());
}
}

/// <summary>
/// CHILD CLASS
/// </summary>
private class InnerJackSon : InnerJack
{
public InnerJackSon()
{
MessageBox.Show ("Private
class InnerJackSon Child Constructor");
}
}

public void DisplayPrivate()
{
InnerJack.display ();
InnerJackSon IJS = new InnerJackSon
();

}

}

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lazy loading c#?

1120


What is out int in c#?

964


Is string passed by reference in c#?

981


What does exclamation mark mean c#?

1064


Which programming language is best for desktop applications?

1010


How do you declare a variable in c#?

1013


What is difference between ienumerable and ienumerator in c#?

974


Why do we use classes?

940


Is list ienumerable c#?

1046


how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge

2063


can you allow a class to be inherited, but prevent the method from being over-ridden?

1017


Is null c# operator?

1009


How can I create a process that is running a supplied native executable (e.g., Cmd.exe)?

1150


How to transpose multi-dimensional array?

1145


What is a Command Object in C#?

1086