You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassConversionTest7{privateclassMyEntity{publicintEntityId{get;set;}publicintFavoriteColorId{get;set;}publicstringName{get;set;}}privateclassMyColor{publicintColorId{get;set;}publicstringColor{get;set;}}publicvoidBugRepro(){varentities=newList<MyEntity>();varcolors=newList<MyColor>();varwrongOrder=(fromeinfromeinentities
join c in colors on e.FavoriteColorId equals c.ColorId
where e.FavoriteColorId >0& c.Color =="green"selectnew{ e, c }
orderby e.Name
selecte).ToList();}}
Expected output
varwrongOrder=(fromeinentities
join c in colors on e.FavoriteColorId equals c.ColorId
where e.FavoriteColorId >0& c.Color =="green"
orderby e.Name
selectnew{ e, c }).ToList();
Details
Product in use: VS extension
Version in use: 9.2.2.0
Even though it's bad practice, Visual Studio allows the OrderBy to be after the Select when writing VB.NET. But after converting to C#, VS shows an error with the code. The converter should swap the OrderBy and Select statements in this example to prevent the error.
VB.Net input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: