skip to main | skip to sidebar

Code.NET

Friday, January 25, 2008

Another question....

class A
{
public A()
{
Console.WriteLine("Me A");
}
}
class B : A
{
public B()
{
Console.WriteLine("Me B");
}
}

If an object of class B is created which constructor will fire first?
Labels: constructors, constructors in .NET, Interview questions in .NET

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Favourite Websites

  • wakoopa
  • Simpsonize You
  • odetocode.com
  • Lifehack

Blog Archive

  • ►  2015 (2)
    • ►  April (1)
    • ►  February (1)
  • ►  2014 (1)
    • ►  July (1)
  • ►  2010 (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2009 (8)
    • ►  November (1)
    • ►  October (3)
    • ►  July (1)
    • ►  January (3)
  • ▼  2008 (17)
    • ►  September (1)
    • ►  May (2)
    • ►  April (3)
    • ►  March (2)
    • ►  February (2)
    • ▼  January (7)
      • Another question....
      • Enums - some more basics
      • Question on hiding instance variable
      • Constructors and Destructors
      • Question on exception / try - catch block
      • .NET basics revisited......continued
      • .NET basics revisited
  • ►  2007 (16)
    • ►  December (1)
    • ►  November (1)
    • ►  October (2)
    • ►  September (7)
    • ►  July (2)
    • ►  June (3)
Feedback