Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将VBScript代码段转换为C#_C#_Vbscript_Converter - Fatal编程技术网

将VBScript代码段转换为C#

将VBScript代码段转换为C#,c#,vbscript,converter,C#,Vbscript,Converter,我已经看完了代码,但我根本不知道什么函数在做什么,以及如何与C#我的主要编码语言相关 Set mSkype = WScript.CreateObject("Skype4COM.Skype", "Skype_") ContactName=InputBox ("Enter the contact's Skype User Name" & CHR(13) & "Note that this must be the User Name and not the Display Name"

我已经看完了代码,但我根本不知道什么函数在做什么,以及如何与C#我的主要编码语言相关

Set mSkype = WScript.CreateObject("Skype4COM.Skype", "Skype_")

ContactName=InputBox ("Enter the contact's Skype User Name" & CHR(13) & "Note that this must be the User Name and not the Display Name", "User Name:")

If ContactName = "" Then
    WScript.Quit
Else
    If mSkype.User(ContactName).FullName="" then
        WScript.Echo ("The name " & ContactName & " is not in your Contact List")
        WScript.Quit
    End If  
End If


PictureFileName=InputBox ("Enter the path and name of the Picture" & CHR(13) & "The file extension must be .jpg", "Save Picture as:")

If PictureFileName="" Then
    WScript.Quit
End If


cmdStr = "GET USER" & " " & ContactName & " " & "AVATAR 1" & " " & PictureFileName
mSkype.SendCommand mSkype.Command(0, cmdStr)

哦,我确实导入了skype4com,并且我使用了该api,这不是转换的问题。

InputBox是一个显示提示输入的窗口。它在VB.NET中可用,通过添加对Microsoft.VisualBasic的引用,您可以在C#中实际使用它。看


WScript在VB中也不可用,在Skype开发者论坛上研究如何使用Skype插件可能会很好。”这是一个关于如何在C#中使用Skype DLL的链接。

这项工作似乎在这里完成: