I like this "tour" format. Have a informative discussion with 3-4 people rather than just bumping into 10+.
With the Dispose problem: I say make the Dipose() public or protected. This is functionality that should always be exposed, if not to all classes, at least those that inherit from an IDisposable object.
The confusion (if any) caused between Close() and Dispose() is negligible in in my opinion, and is an issue that can (and usually is) resolved with good documentation addressing the possible confusion. There is definitely a conceptual difference between the
two methods (even if there is no difference in its implementation)
Hi Joedu! I hope you are not changing the behaviour of the interfaces!!
I mean if I implement for example IList and IList<T>, but I want to show the user only the IList<T> implementation. I'm hiding IList by implementing it implicitly (i guess this was the right term - I'm always confusing them). If somebody wants the implementation
of IList the cast to IList must be done. It should be done this way and nothing should be changed.
Are you going to change this behaviour? Are all members of IList and IList<T> then accessible without cast (even the one from IList)?
Littleguru: No, that's not what I was suggesting, although with the minimal amount of explanation I did in the video, I can see how one would get that impression.
The primary problem is that there's no way to call this from a base class. If it weren't explicitly implemented, you could easily just do:
But because explicit implementations are emitted as private by the C# compiler (which the team firmly believes is the correct design), this isn't possible. You can't even do it in IL. One could imagine new C# syntax that made this possible:
But this would only be possible with either
a) Explicitly implemented methods being emitted as family; or,
b) A "basecall" IL instruction.
We're going to look at these in future releases, but we dropped the idea for Whidbey.
Ok *wipe sweat*
Yes the explaination in the video was very short, that's true. I didn't even know that this
doesn't work. I had to test it and the C# compiler in Whidbey gave an error. It's actually a quite strange behaviour, since you can call the method from outside... as you said in the video.
Hopefully you are finding a good solution for it. The "basecall" IL instruction does not sound bad.
Darn it, I want that Microsoft Cup.
Hey, if I send you guys a postcard, do you think I can have the C9 guy AND a cup?
As for the video, I really appreciate that you guys are letting us in on this kind of stuff. C9 should have their own actual television station that just showcasing all this kind of stuff.