Hotel in Munich
Methodology: Process Model of Microsoft CRM

Generics and CLS Compliance

Kevin Dente has a problem with generics as not being CLS compliant. With Longhorn generics will be CLS compliant.

In the meantime with CLS compliant assemblies this can be done:

  • using generics within the classes is not a problem
  • having generic classes as arguments of public/protected methods, both a generic and an alternate version can be supplied. The generic version is marked with the attribute [CLSCompliant(false)], while the alternate version is CLS compliant.

With the Longhorn timeframe the non-generic version can be marked obsolete.



Feed You can follow this conversation by subscribing to the comment feed for this post.

[karsten samaschke]

AUTHOR: [karsten samaschke]
DATE: 06/22/2004 03:37:00 AM

Kevin Dente

That would be the dual API approach that I mentioned. Generally annoying and just messy that I need to do this.

The comments to this entry are closed.