Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return either dataset or integer from function
Message
From
05/04/2004 11:10:37
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00892206
Message ID:
00892284
Views:
14
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform