This worked in .NET 3.5 but it does not compile in 4.0
var allergies = from allergy in typedDataset.allergy
where allergy != string.Empty
In 4.0, I had to cast the typed dataset to IEnumerable<> using the extension method Cast<>
var allergies = from allergy in typedDataset.allergy.Rows.Cast<TypedDataSet.allergyRow>()
where allergy.drug != string.Empty
What motivated this change? It's much less elegant now. The compiler should take care of the messy stuff. Will this be fixed?
View Complete Post