Salut à vous tous,
Voila, Je voudrai réaliser un web service qui renvoi un table de string(affichage des noms), Mais lorsque je debug il m'affiche l'erreur suivante:
Cannot implicitly convert type 'string' to 'string[]'
et voila le code:

Code C# : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
        private void Form1_Click(object sender, EventArgs e)
        {

                 MySW.ServiceSoapClient mySoap = new MySW.ServiceSoapClient();

                 // ici l'erreur

                 string[] myReturnedStrings = mySoap.SomeMethod();
                 MessageBox.Show("Result:", myReturnedStrings[0],
                 myReturnedStrings[1]);

}
Web Service
Code C# : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
public string[] SomeMethod()
{
string[] myStringArray = new string[2];
myStringArray[0] = "Hello";
myStringArray[1] = "Goodbye";
return myStringArray;
}
Merci de vos conseils

Cordialement