Answered by:
VB.NET Overload with just different out put types

Question
-
User1449393024 posted
Hi there.
I want to know if this is possible to have overloads of a function with just different output Types?
for example:
Function Test(a as integer) as integer
Function Test(a as integer) as string
Friday, April 5, 2013 2:20 PM
Answers
-
User-1360095595 posted
No. An overload cannot just be different in return type.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, April 5, 2013 2:30 PM -
User-691245060 posted
Addition to MetalASP.NEt Answer -
http://stackoverflow.com/questions/1481137/really-impossible-to-use-return-type-overloading
thanks,
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 6, 2013 9:39 AM
All replies
-
User-1360095595 posted
No. An overload cannot just be different in return type.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, April 5, 2013 2:30 PM -
User1449393024 posted
So what I should do?
I have a function which returns the result of a single field of a query.
It cant be a string or date or integer or float.
what to do?
Saturday, April 6, 2013 9:27 AM -
User-691245060 posted
Addition to MetalASP.NEt Answer -
http://stackoverflow.com/questions/1481137/really-impossible-to-use-return-type-overloading
thanks,
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 6, 2013 9:39 AM