|
-
Feb 5th, 2004, 01:42 PM
#1
Thread Starter
Frenzied Member
what is more practical?
I am converting a class I made in VB.Net to C#. The class exposes an overloaded set of fuctions that return 4+ types of data objects based on function parameters.
Since I am moving it over to C# I am thinking about creating a Object that implicitly converts between the 4+ objects instead of having a return type of object that then has to be cast or creating an overload for each object that the function can return.
I like the implicit conversion because it will save me some typing in the long run but I'm not sure which is really the most prcticial concept.
The Vb.Net version takes a param ReturnType and returns an object that will cast to the apropriate type. So my existing code is already geared towards returning an object and expectng the developer to cast the object to the correct type.
What do you guys think?
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|