| September 09, 2009 05:22:38 |
#4 |
| kirangiet |
Member Since: June 2009 Total Comments: 24 |
RE: Virtual function in c# |
Some Facts about Virtual Keyword
1)It is not compulsury to mark the derived/child class function with Override KeyWord while base/parent class contains a virtual method 2)Instead of Virtual we can use New Keyword 3)We will get a warning if we won't use Virtual/New keyword. 4)At the end its all depends which class object we are creating and assigned to which class reference.
Finally we are using virtual/new just for the sake of compiler.
Trust me write the code your self and test then you won't disagree. |
| |