w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
C# Linq question

I can't add a comment, because my reputation is to low.

Your problem is not linq itself but how you use it. What you are doing is printing one line. This line will contain the value of the ToString call on a list/collection/linq result. I think it might help you if you don't try to put everything in one line. The error should be obvious if you extract the linq query from the write line.

I don't have an IDE here at my workplace, so I can't confirm my code works, but what you want to do is basically:

var addresses = (from myaddresses[x].PostalNr where x =>
myaddresses[x].SortType == "110" )

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.