Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Entries from 2022-02-12 to 1 day

PowerShellでHashSetのForEachメソッドを使う

$map = New-Object System.Collections.Generic.HashSet[string]; $map.Add("ABC") > $null $map | Get-Member とすると出てこないが、PowerShell ISEなどでオートコンプリートを使うとHashSetにForEach()というメソッドが生えていることが分かる。 このForE…