[Mono-devel-list] bug with List<T>

Ben Martin benmartin at fourthplanet.net
Mon Jun 14 17:36:15 EDT 2004


When I use List<T>, I can compile, but I get errors when I run the code. 
E.g. the following code compiles:

using System.Collections.Generic;

public class TestDriver {
  static void Main()
  {
    List<int> y = new List<int>();
    return;
  }
}

but when I run it I get:
**  (test3.exe:13955): WARNING **:  Could not load class from token 
0x01000002 in /home/benjmart/test3.exe

Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required.

This is under beta 2.

I would have hit bugzilla with this but I don't even know if the problem 
is with the runtime or the compiler...



More information about the Mono-devel-list mailing list