Refactor; use .NET classes where possible

handled here: https://github.com/randy3k/UnitTesting/blob/fa6538b20df4a21135c109bfb90675444125d320/sbin/appveyor.ps1#L24