System.Linq.Enumerable

Introduction

The System.Linq.Enumerable namespace provides methods for working with collections of items. It's a cornerstone of .NET programming for efficient list, set, and other collection manipulation.

Methods

Key methods include:

Example Usage:

            
                let numbers = [1, 2, 3, 4, 5];

                let sum = numbers.Sum();
                print(sum); // Output: 15

                let average = numbers.Average();
                print(average); // Output: 3.0

                let min = numbers.Min();
                print(min); // Output: 1

                let max = numbers.Max();
                print(max); // Output: 5

                let select = numbers.Select();
                print(select); // Output: [1, 2, 3, 4, 5]