Coffeehouse Post

Single Post Permalink

View Thread: Interviewing programmers
  • User profile image

    Martin Carolan wrote:
    As he said in his message, there isn't one, System.Object has it, so they all have it

    Not necessarily.

    If you compile your project with the /nostdlib you can define your own classes which don't inherit from System.Object (it's how you compile mscorlib.dll btw).

    Dr Herbie wrote:
    "What is polymorphism and why is is useful?"

    I was shocked at the number of candidates that couldn't separate polymorphism from class inheritance and I don't think I've met one yet who could explain why it was useful (other than inheriting functionality, which is not the correct answer).

    It's useful because it enables code-reuse and overriding older/irrelevant methods.

    But they're not so much separate as they are dependent. Polymorphism depends on inheritance. That's why VB6 isn't a true OOP language.

    Dr Herbie wrote:
    Also, for C#, ask them to explain garbage collection.

    "See Sharp Garbage Collection you say? Well I know the city santiation guys use thick gloves when dealing with the bins in the public loos"