Re: Creation Generic class



Frank VDL wrote:

public abstract class IndexBase<T> {

  private Dictionary<T, MyBaseType> _dict;

  public IndexBase() {
    _dict = new Dictionary<T, MyBaseType>();  //this one is going wrong
  }
}

The code you give compiles just fine for me. I modified MyBaseType to "int" for a test, but apart from that I just copied it from your post. Are you sure that's the exact code you used?



Oliver Sturm -- omnibus ex nihilo ducendis sufficit unum Spaces inserted to prevent google email destruction: MSN oliver @ sturmnet.org Jabber sturm @ amessage.de ICQ 27142619 http://www.sturmnet.org/blog .



Relevant Pages