TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Smart Lucky
NA
555
638.2k
Nested Class Problem in C#
Dec 27 2011 1:29 AM
Hi
i have make a program in which two nested classes one is outer class and other is inner class and just i have make their just constructor and i inherit them with the main class demo when ever i make an object of demo class by default outer class constructor is calling can any one tell me why it is calling although i am not making outer class object why it is calling....................? w8ing for rep
class demo :outerClass
{
static void Main(string[] arg)
{
demo d = new demo();
}
}
class outerClass
{
public outerClass()
{
Console.WriteLine ("This is outer constructor");
}
class innerClass
{
public innerClass()
{
Console.WriteLine("This is inner class constructor");
}
}
}
Reply
Answers (
6
)
Drawing Tool in Console Application
i have some errors and i sent my code