Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Overloaded Methods
Message
De
22/08/2002 16:22:06
 
 
À
21/08/2002 21:16:47
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
00691767
Message ID:
00692657
Vues:
29
Claudio,

Do you work in C# or VB? I still have no clue how to do what you've suggested ... I'm using C#. I can't find the proper place to put the MessageName attribute. This is how I currently have a WebMethod defined:
[WebMethod(Description="Returns List of Apparatus")]
public string GetApparatusList(string GUID, string Message, long StationKey)
{
...
}
I would like to have an overloaded method such that I can call the GetApparatusList method either with or without the StationKKey. What would be the correct syntax for this?

TIA,
~~Bonnie

>>Hmmm ... looks like I'm gonna have to play around with this some ... so, you're saying that you *can* use the same method name?
>
>:)
>
>Yup, that´s what I´ve done... the overloaded method is called by the same name from the client, just passing parameters of different type... quite easy... for the server-side, it´s just necessary to inform the MessageName attribute of the < WebMethod >.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform