Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/282.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
C# 无法使用way2sms从pc向手机发送短信_C#_Sms_Way2sms - Fatal编程技术网

C# 无法使用way2sms从pc向手机发送短信

C# 无法使用way2sms从pc向手机发送短信,c#,sms,way2sms,C#,Sms,Way2sms,我在应用程序中使用way2sms第三方控件从pc向手机发送短信。这是我的密码 SendSms sms = new SendSms(); string status=sms.send(txtID.Text, txtPass.Text, txtMessage.Text, txtMN.Text); if (status == "1") MessageBox.Show("Sent successfully", "Information", MessageBoxButtons.OK, Messag

我在应用程序中使用way2sms第三方控件从pc向手机发送短信。这是我的密码

SendSms sms = new SendSms();
string status=sms.send(txtID.Text, txtPass.Text, txtMessage.Text, txtMN.Text);
if (status == "1")
    MessageBox.Show("Sent successfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
else if (status == "2")
    MessageBox.Show("No Internet Connection", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
    MessageBox.Show("ID or Password is not correct", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);`  
每次我收到错误“2”,上面写着没有互联网连接


有人来帮我吗?

请不要在问题标题中包含关于所用语言的信息,除非没有它就没有意义。标记用于此目的。好的@OndrejJanacek。谢谢你的建议。你能帮我解决这个问题吗?sms.send()的返回类型是字符串吗?通常,如果它真的只返回整数,那么它应该是
int
。错误发生在
.send()
方法本身。由于某种原因,它正在返回
2
。需要进行更深入的检查以找出根本原因。@ChandanRoy即使我检查了方法的返回类型
sms.send()
,您也会告诉我要做什么。我不明白为什么它总是返回错误“2”,因为没有互联网连接是用户定义的消息。我不知道到底出了什么问题。您有权访问
.send()
方法的源代码吗?