Browse by Tags

All Tags » .Net » Bug (RSS)

C# compiler and implicit keyword: can be better

Imagine the following code: class A { public static implicit operator B ( A a) { return new B (a); } } class B { public B( A a) { } } This code compile without error and it's normal. Now imagine the following one: class A { public static implicit...
Posted by Matthieu MEZIL | with no comments
Filed under: , ,

Bug with IQueryable and yield syntax: System.BadImageFormatException "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

I find a bug if you mix IQueryable and yield syntax. After Diego has changed a little bit my sample to reproduce it, this is the code he sent to the C# team: class Program { static void Main( string [] args) { try { GetCategoryProductsUsingQueryable(...

TPT with designer can generate errors 3034 or 3021

I found two cases of errors generated by the EDM designer when you want to do TPT. Error 3034: Imagine the following scenario: A table Contacts ContactID (PK) A table Employees ContactID (PK) OfficeID (Nullable, FK to Offices.OfficeID) A table Offices...

Reflector IL to C# Bug

I was watching Entity Framework code when I found this code: switch ( this .<>1__state) { case 3 : case 4 : break ; default : return ; try { } finally { this . d__0.<>m__Finally6();" href="http://www.aisto.com/roeder/dotnet/Default...
Posted by Matthieu MEZIL | with no comments
Filed under: , , , ,

Reflector Bug with generics

For this code: class A <T> { public A() { var b = new B (); } class B : A <T> { } } Reflector generates this: class A <T> { public A() { var b = new B <T> (); } class B : A <T> { } } which isn't correct.
Posted by Matthieu MEZIL | 2 comment(s)
Filed under: ,