Generically calling an overloaded method
My question has been deemed off topic even after editing. What else is needed?
Generically calling an overloaded method
My question has been deemed off topic even after editing. What else is needed?
In short, nothing as far as I can see. This is your comment on the answer to your question.
I simplified this from working code, otherwise Value is a property of another object, and so was the Description. Tried to show the meat of the problem and didnt cared about code formatting as Resharper is my shepherded and I fear no code formatting evil! Thank you :) Wether an object can be at least 2 different types at once, that is damn good question and all my code massaging seems to be pointless :( Thanks again, with those hints I think this question is now stupid and should have used a better design for this case rather than tried to jimmy bar it with ugly if's! :) – Arjang 3 hours ago
So, you posted hypothetical code, which is off topic. You could update your question with the real code, but if you do that, it will surely be rolled back because it would invalidate the existing answer. That answer shouldn't have been posted, because it creates situations like this, but that's another matter entirely.
I think your best bet at this point is to create a new question with your real code.