Select the product you need help with
BUG: A BadImageFormatException exception may occur when you use a recursively defined constraint of a generic type in a .NET Framework 2.0-based applicationArticle ID: 940164 - View products that this article applies to. On This PageSYMPTOMSIn a Microsoft .NET Framework 2.0-based application, you use a recursively defined constraint of a generic type. When you do this, a BadImageFormatException exception may occur at run time. This problem occurs only in certain scenarios. CAUSEThis problem occurs because of an issue in the Microsoft Visual Studio 2005 common language runtime (CLR 2.0) components. WORKAROUNDTo work around this problem, remove the class constraint from the public static E GetClass<E> method. Note Constraints are limits that are put on generic-type parameters. To remove the class constraint from the public static E GetClass<E> method, change the method signature as follows. Existing codeReplacement codeSTATUS Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONFor more information about generics in the CLR, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn.microsoft.com/msdnmag/issues/06/00/NET/default.aspx
(http://msdn.microsoft.com/msdnmag/issues/06/00/NET/default.aspx)
Steps to reproduce the problem
Properties |


Back to the top








