Returning a collection of objects from a PowerShell function

If you’re writing a function that returns a collection then don’t forget to include the comma operator in the return statement. If you forget it your function will work correctly when the collection contains multiple objects, but fails when it contains 1 object. Take the following buggy example: If you execute this code when $myarray […]

Read more
Understanding the LINQ nested grouping example

Here’s an explanation of how the default example for LINQ nested grouping actually works. The usual example for nested grouping looks like this: The objective of this statement is to first group-by students into faculties and then in each faculty create subgroupings of students by their DebtCategory. So how does this actually work and whats […]

Read more