Tuesday, October 5, 2010

Interview

I would like to ask the following questions/tasks on a technical interview.
  1. Implement a singleton.
    Yes, kinda boring question. But I'll expect simple implementation, like follows:

    public class Singleton{
      private Singleton(){}
      public static Singleton Instance = new Singleton();
    }

    and nothing more. There is no words about laziness. Anything more complicated signals about over-engineering.
  2. Implement (I)Disposable pattern. And after it - When does a type need a finalizer?
    Second part is simple, first part is not good without explanation. In this case I'll wait for

    protected virtual void Dispose(bool isDisposing)

     
  3. ...to be continued

No comments:

Post a Comment