Quickie Win utils - C# console/win or PowerShell?
If I'm making a quick app to take some input and generate a file, would Powershell or a C# Win/Console app be faster or more efficient?
Edit: Run faster, although I'm not anticipating any huge volume of operations. But I do know C# very well. However, if Powershell has stuff out of the box to do file/shortcut/parsing that's easier than c#, then.开发者_如何学Python.
Code-wise, it's about the same amount of effort. C# console app will be simpler since you don't need to register anything with powershell and you don't require the powershell runtime. Unless you need to take advantage of the existing commands available in PowerShell for what you want to do, a C# console app would be best.
It depends what it's for, and how much experience you have coding in either one. Is it an app to be distributed? Then C# would probably be a better option. If it's just for you or a limited number of users, a Powershell script might be quicker.
When you are asking faster/more efficient, do you mean faster to create the app or would it's processing be faster/more efficent?
精彩评论