Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > BOOK: Beginning Visual C#
|
BOOK: Beginning Visual C#
This is the forum to discuss the Wrox book Beginning Visual C#, Revised Edition of Beginning C# for .NET v1.0 by Karli Watson, David Espinosa, Zach Greenvoss, Jacob Hammer Pedersen, Christian Nagel, Jon D. Reid, Matthew Reynolds, Morgan Skinner, Eric White; ISBN: 9780764543821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 29th, 2005, 03:19 AM
Registered User
 
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default I have a question about construct a object

public class MyBase
{
         public MyBase()
    {
        Console.WriteLine("MyBase Construct");
    }
         public MyBase(int i)
    {
        Console.WriteLine("MyBase Construct one");
    }
}

public class MyDerivedClass : MyBase
{
    public MyDerivedClass(int i)
    {
         Console.WriteLine("MyDerivedClass Construct one");
    }
}

The author said that the construct sequence is follow:
System.Object.Object()
MyBase.MyBase(int i)
MyDerivedClass(int i)


But when i construct a object like this;
MyDerivedClass myDervied = new MyDerivedClass(3);

The output is follow:
MyBase Construct
MyDerivedClass Construct one

So in my opinion the construct sequence is follow:
System.Object.Object()
MyBase.MyBase()
MyDerivedClass(int i)


I am a Chinese, I am not good at English,please forgive me for my syntax errors. and tell the answer about my problem,Thank you!!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Construct checkbox with Javascript BananaJim Javascript How-To 4 April 30th, 2012 02:32 AM
Construct a SQL Select Statement ricespn Beginning VB 6 1 May 28th, 2007 07:57 AM
Using Mapper with Transform - How to construct msg anuphshah Biztalk 0 August 16th, 2006 06:44 AM
Use variables or other construct? jacob XSLT 4 November 15th, 2005 08:06 AM
changing pixel color in if/then construct rharris VB.NET 2002/2003 Basics 1 June 19th, 2005 09:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.