How to translate CreateObject("Wscript.shell") into C#

Ale*_*lex 5 c#

How could i translate this in c#?

Set WshShell = WScript.CreateObject( "WScript.Shell" )
Run Code Online (Sandbox Code Playgroud)

Thx. At what is this used? And also what is the library i have to include in c# in order to work?

Dan*_*rth 0

你不应该——也许这是不可能的。您应该使用 .NET 框架的本机类来实现您想要的。根据对该对象执行的操作,.NET 中有多个可以使用的类。如果您展示 的用法,WshShell我们可以告诉您 .NET 框架中相应的类。