C# 1.x with C# 2.0 *.DLL

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

Is it possible to reference a .NET 2.0 .dll with a .NET 1.x compiler? I
have tried with C# but I get a compiler error. I was wondering becuase
you can implement both generic and non generic iterators and when you
implement a generic interator with the IEnumerable<> interface it makes
you implement the non-generic version too. I was thinking it was
because a .NET 1.x app wouldnt beable to use the generic version so it
would use the non-generic version instead.
 
No; an app running in the 1.1 runtime simply can't understand the IL in
a 2.0 assembly, so is unable to reference it directly. You can,
however, create a 2.0 wrapper assembly that uses both 1.1 and 2.0
libraries, and use 1.1 compatible approaches (preferably interfaces
etc) to liase between them.

Marc
 
Back
Top