I have the sample of code below to get a specific code on a list
List list = new List { "555", "55", "5", "25" };
var codes = list.Where(x => x.Code.Contains("5"));
But it still return the 4 code on the list..
what code should I write?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Nov 27, 2019, 11:33 PM
If you have to only single record return then you have to use below code
If you want to multiple record then used below code
Thanks
Ashutosh GuptaPosted Nov 27, 2019, 10:43 PM
Rajanikant HawaldarPosted Nov 27, 2019, 8:33 PM