From the course: .NET Essentials: Working with LINQ

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Additional MoreLinq examples

Additional MoreLinq examples - .NET Tutorial

From the course: .NET Essentials: Working with LINQ

Additional MoreLinq examples

- We've seen how to add more length to new, get into our projects. And we've seen the move methods. Now let's take a look at some other interesting methods that are part of this library. We'll start with pads. It's used to Pat out a sequence with default values. If it's not big enough. So here I've got seven values. If it's a pad 10, it's going to add three additional items to the end, and it's going to use the default value for whatever type I'm working with. In case case, it's an ant. If I do pad start, it just does the padding. At the beginning of the sequence. Next one to look at is called shuffle. It returns a sequence of elements in random order. So right now with this one, three, five, seven, that's my original sequence. Every time I run this, I'm going to get this first list. This first result set and a different order. The second one in this editor is called permutations and it generates a sequence of all the…

Contents