Instantiate a generic collection with ctor args

How does one create a HashSet with a ctor arg of StringComparison.OrdinalIgnorecase?

PS M:\> New-Object -TypeName System.Collections.Generic.HashSet[string] -ArgumentList @([StringComparison]::OrdinalIgnorecase)
New-Object : Multiple ambiguous overloads found for "HashSet`1" and the argument count: "1".
At line:1 char:1
+ New-Object -TypeName System.Collections.Generic.HashSet[string] -ArgumentList @( ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Might be wrong (don’t read MSDN all day :slight_smile: ) but if I understand it correctly StringComparison is a enum/property to tell string methods how to compare strings.
It’s not a constructor.

The class and constructor is StringComparer.

I tried to reply when you posted your response (thanks for doing that so quickly) but the broken web host dos prevention locked me out…

I can’t believe I fat fingered that without noticing, I actually fired up VS and whipped up a simple invocation as I thought I wasn’t doing something right. I still failed to notice my console repro was differnt:)

Thanks for the nudge!