C#: functional approaches explained solving one specific problem

In the present day I wish to inform you about purposeful approaches. Why they’re good, and why they’re easy. We have to write some code Allow us to think about, that we’ve got some array of strings. It might be an array of names : var objects = new[] { “Peter”, “Albert”, “John”, “Jim”, “Pavel”, […]

C#: Compare two List items

Linq has helpful methodology to check two lists. Through the use of Intersect, we will verify which components in supply listing are additionally contained in evaluate listing. var supply = new Listing<string>() { “a”, “b”, “c” }; var evaluate = new Listing<string>() { “b”, “c”, “d” }; var consequence = supply.Intersect(evaluate); Enter fullscreen mode Exit […]