Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return either dataset or integer from function
Message
De
05/04/2004 11:10:37
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00892206
Message ID:
00892284
Vues:
13
Chris-

>Re: Return either dataset or integer from function

IMO, if you want one method to return both you need to think through the design a little bit further in order to decide what the best implementation is. First, you can't (at least in C#) have one method return more than one type, but you can write overloaded methods. However, the method parameters have to vary in number or type. So, in what case do you want to return an integer and in which case do you want to return a DataSet? That would probably help us give you better advice.

p.s. I should have added that even if you can return either type from a VB.NET method, it doesn't feel correct to do so. They're so different it would seem that what the method is doing is very different work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform