4 ms·
Except for the "iex" this isn't really Powershell specific - it's just instantiating a .NET framework object and calling a method on it. It might as well be C#.
by contextfree 15y ago
Except for the "iex" this isn't really Powershell specific - it's just instantiating a .NET framework object and calling a method on it. It might as well be C#.
- lucisferre 15y agoNo it might as well not be. One of the big complaints about powershell is how unclear the command line syntax for tools tends to be. A big part of developing a good C# API (or any for that matter) is clarity, readability and understanding. One of the reason fluent APIs are popular. Bad is bad, don't blame .NET or C# for that. And yeah I realize you can come up with an ugly command line example in just about anything. But powershell tends to be one of the uglier ones out there.
- ferventcoder 15y agoWe started with a much more involved set of steps to install and people kept wanting a one liner for the install. It's a tradeoff
- contextfree 15y agoHuh? It's calling DownloadString on a System.Net.WebClient. That IS a C# API. I'm not sure what you're talking about.