Hi,
Looking to create a List<T> in PowerShell but struggling to find out how to add properties to it. This is what I have so far but
I get an error message on Add or AddRange.
using namespace System.Collections.Generic
class Errors
{
[string] $Y
[string] $X
}
Clear-Host
$Errors = New-Object List[Errors]
$Errors.Add(New-Object -TypeName Errors -ArgumentList "0", "1")
$Errors.Add("1", "2")
$Errors.AddRange("3", "4")
$Errors
This C# example shows what I'm trying to achieve
