Hi,
I am currently working with .Net 2.0 and have an interface whose generic type is used to define a method's return type. Something like
interface IExecutor<T> {
T Execute() { ... }
}
My problem is that some classes that implement this interface do not really need to return anything.
In Java you can use java.lang.Void for this purpose, but after quite a bit of searching I found no equivalent in C#. More generically, I also did not find a good way around this problem. I tried to find how people would do this with delegates, but found nothing either - which makes me believe that the problem is that I suck at searching :)
So what's the best way to solve this? How would you do it?
Thanks!