Bonjour ,
Je développement une appli client serveur en c#.Mon code ci-dessous me génère le message d'erreur suivant :
"La méthode surchargée ... Champ_Recherche possède arguments non valide"

Aidez moi svp a trouver ce qui cloche. Merci !
---->CLient
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
Private void btn_EnregChamps_Click(object sender, EventArgs e)
        {// champsSelect  est une listebox
 
 
            foreach (object item in ChampsSelect.Items)
            {
 
                string Champ_id = Client.Champ_Recherche((ChampsSelect.Tag as List<Champ>), item.ToString());
 
            }
 
        }
---->Serveur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.IO;
using System.Configuration;
using System.Diagnostics;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Odbc;
using System.Runtime.Serialization;
using Model;
using Infragistics.Win.UltraWinTree;
 
 
namespace eDipWCFLibrary
{
 
    [ServiceContract()]
    public interface IService 
    {
 
        [OperationContract]
        string Champ_Recherche(List<Champ> chps, string Valeur);
 
 
    }
 
 
    public partial class Service : IService 
    {
         public string Champ_Recherche(List<Champ> chps, string Valeur)
        {
            foreach (Champ chp in chps)
            {
                string chpval = string.Format("{0} - [{1}]", chp.NOM, chp.LIBELLE);
                if (chpval == Valeur)
                {
                    return chp.CHAMP_ID;
                }
            }
            return "";
        }
      }
}