C
Chak
I have 4 newbie questions regarding C# . Hope they are not too raw :-
1) As a migrant from COBOL to Java, i was amazed to see a main() method of a
class creating an object of its own class ! I used to ask myself how a
class can instantiate itself from within ? Is this also possible / the
done thing in C# ?
2) C++ had a concept of copy constructors to handle pass by values (though i
don't know the exact details of that construct). How does C# manage to
overcome that problem without the need for copy constructors ?
3) If the 'object' type is the parent of all types, is a 'class' type also
inherited from an 'object' type ?
4) I came across something called 'marker ' interfaces whose methods need
not be implemented by the implementing class. These are just a formal
implementation without the need to define the interface methods.Are there
such interface types and if so , isn't this a contradiction ? I thought ALL
interfaces are supposed to be implemented ? Please correct me if i am wrong
on this .
Regards,
Chak.
1) As a migrant from COBOL to Java, i was amazed to see a main() method of a
class creating an object of its own class ! I used to ask myself how a
class can instantiate itself from within ? Is this also possible / the
done thing in C# ?
2) C++ had a concept of copy constructors to handle pass by values (though i
don't know the exact details of that construct). How does C# manage to
overcome that problem without the need for copy constructors ?
3) If the 'object' type is the parent of all types, is a 'class' type also
inherited from an 'object' type ?
4) I came across something called 'marker ' interfaces whose methods need
not be implemented by the implementing class. These are just a formal
implementation without the need to define the interface methods.Are there
such interface types and if so , isn't this a contradiction ? I thought ALL
interfaces are supposed to be implemented ? Please correct me if i am wrong
on this .
Regards,
Chak.