Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralConstructors Pin
Ganjah78615-Jun-04 11:57
Ganjah78615-Jun-04 11:57 
GeneralRe: Constructors Pin
leppie15-Jun-04 12:07
leppie15-Jun-04 12:07 
GeneralRe: Constructors Pin
Colin Angus Mackay15-Jun-04 12:09
Colin Angus Mackay15-Jun-04 12:09 
GeneralRe: Constructors Pin
Heath Stewart15-Jun-04 12:10
protectorHeath Stewart15-Jun-04 12:10 
GeneralRe: Constructors Pin
Ganjah78615-Jun-04 12:43
Ganjah78615-Jun-04 12:43 
GeneralRe: Constructors Pin
Heath Stewart16-Jun-04 3:06
protectorHeath Stewart16-Jun-04 3:06 
GeneralRe: Constructors Pin
Alvaro Mendez15-Jun-04 12:55
Alvaro Mendez15-Jun-04 12:55 
GeneralRe: Constructors Pin
Heath Stewart16-Jun-04 3:04
protectorHeath Stewart16-Jun-04 3:04 
Really? Try compiling this and examining the IL with ildasm.exe or something:
using System;

public abstract class Test
{
    private Test()
    {
    }

    protected Test(string name)
    {
    }
}

public class Test2 : Test
{
    protected Test2(string name) : base(name)
    {
    }
}
You're right - the default ctor of the base class won't be called, but if it isn't private it will be called. There was no requirement in the original post for the default ctor of the base class to be called.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Constructors Pin
Uwe Keim15-Jun-04 21:18
sitebuilderUwe Keim15-Jun-04 21:18 
GeneralRe: Constructors Pin
Heath Stewart16-Jun-04 3:05
protectorHeath Stewart16-Jun-04 3:05 
GeneralPossible Attribute bug Pin
leppie15-Jun-04 11:18
leppie15-Jun-04 11:18 
GeneralRe: Possible Attribute bug Pin
Heath Stewart15-Jun-04 11:27
protectorHeath Stewart15-Jun-04 11:27 
GeneralRe: Possible Attribute bug Pin
leppie15-Jun-04 12:03
leppie15-Jun-04 12:03 
GeneralRe: Possible Attribute bug Pin
Heath Stewart15-Jun-04 12:06
protectorHeath Stewart15-Jun-04 12:06 
GeneralLooping Through Windows Forms Instances Pin
XanderSon15-Jun-04 11:06
XanderSon15-Jun-04 11:06 
GeneralRe: Looping Through Windows Forms Instances Pin
Heath Stewart15-Jun-04 11:23
protectorHeath Stewart15-Jun-04 11:23 
GeneralRe: Looping Through Windows Forms Instances Pin
XanderSon15-Jun-04 14:00
XanderSon15-Jun-04 14:00 
Generalc#-Configuration file Pin
Member 115090115-Jun-04 10:46
Member 115090115-Jun-04 10:46 
GeneralRe: c#-Configuration file Pin
Heath Stewart15-Jun-04 11:18
protectorHeath Stewart15-Jun-04 11:18 
GeneralCombobox displaying listview items Pin
mikeyb2515-Jun-04 9:17
mikeyb2515-Jun-04 9:17 
GeneralSQL Escape Sequences Pin
Kannan Kalyanaraman15-Jun-04 8:26
Kannan Kalyanaraman15-Jun-04 8:26 
GeneralRe: SQL Escape Sequences Pin
Werdna15-Jun-04 8:36
Werdna15-Jun-04 8:36 
GeneralRe: SQL Escape Sequences Pin
Alvaro Mendez15-Jun-04 8:50
Alvaro Mendez15-Jun-04 8:50 
GeneralRe: SQL Escape Sequences Pin
Heath Stewart15-Jun-04 8:59
protectorHeath Stewart15-Jun-04 8:59 
GeneralRe: SQL Escape Sequences Pin
Kannan Kalyanaraman15-Jun-04 9:17
Kannan Kalyanaraman15-Jun-04 9:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.