On Mon, 29 Sep 2008 20:13:47 -0700, puzzlecracker <ir*********@gmail.com>
wrote:
1. Can an abstract class have some implementation (say default
assuming derived chooses not to implement it)?
Yes. Though, given your previous question a week ago ("If we implement
methods in abstract class, do we still need to
declare them as abstract"), I have no idea why you don't already know the
answer to this one.
2. Does CSharp has a concept of inner class comparable to java's,
where inner class can reference into wrapping class?
No. You can have nested classes in C#, but they are related only with
respect to accessibility of the outer class members. There's no implicit
reference to any specific instance of the outer class (i.e. they are like
Java's static nested classes).
3. How is virtual, and polymorphism in general, is implemented?
Define "implemented". Are you asking what the actual underlying
implementation is when you use virtual methods or interfaces? If so, the
basic answer is that it's similar to how C++ does it, with a v-table.
Pete