Click here to Skip to main content
15,922,419 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Actually am trying to create a whtsapp messenger with C# in visualstudio.... But am stuck in error of this....
if(WhatsAppApi.Register.WhatsRegisterV2.RequestCode(textBoxPhno.Text,out password,"sms"))
its showed me as "Overloaded method match for WhatsAppApi.Register.WhatsRegisterV2.RequestCode(out string, out string, string, out string)has some invalid arguments".
kindly pls help me.....

What I have tried:

public partial class Registration : Form
{
string password;



public Registration()
{
InitializeComponent();
}

private void btnrqst_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(textBoxPhno.Text))
{
MessageBox.Show("Please enter your Mobile Number", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
textBoxPhno.Focus();
return;
}
if (string.IsNullOrEmpty(textBoxName.Text))
{
MessageBox.Show("Please enter your Full Name", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
textBoxName.Focus();
return;
}
if(WhatsAppApi.Register.WhatsRegisterV2.RequestCode(textBoxPhno.Text,out password,"sms"))
{

}

}

private void Save()
{
this.grpRequestcode.Enabled = false;
this.cnfrmcde.Enabled = false;
Properties.Settings.Default.PhoneNumber = textBoxPhno.Text;
Properties.Settings.Default.Password = password;
Properties.Settings.Default.FullName = textBoxName.Text;
Properties.Settings.Default.Save();
}
Posted
Updated 12-Oct-17 20:30pm

Look at the error message:
Overloaded method match for WhatsAppApi.Register.WhatsRegisterV2.RequestCode(out string, out string, string, out string)has some invalid arguments

Now look at how you are calling it:
C#
if(WhatsAppApi.Register.WhatsRegisterV2.RequestCode(textBoxPhno.Text,out password,"sms"))
The method expects two out string parameters, a "normal" string parameter, then a final out string parameter.
You are passing it a string, an out string, and a string.

You need to match your parameters to the method signature. Consult the documentation for the method to work out what each parameter should contain!
 
Share this answer
 
WhatsAppApi.Register.WhatsRegisterV2.RequestCode(from, out password) error old version
please give a solution
 
Share this answer
 
Comments
Richard Deeming 13-Oct-17 9:34am    
If you want to ask a question, then ASK A QUESTION[^]. DO NOT post your question as a "solution" to someone else's question!

And you're going to need to provide A LOT more information if you want anyone to be able to help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900