What is use of New and virual keyword in c# | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

What is use of New and virual keyword in c#

22nd Jan 2019, 6:35 PM
pramod upadhye
pramod upadhye - avatar
1 Réponse
+ 1
The new keyword is to create a new instance of a class. ClassA myClass = new classA(); The newly myClass object is now used to reference ClassA as a class. The virtual keyword is used in Polymorphism along with the override keyword where a derived method is able to override the derived method of the base class using virtual keyword...
22nd Jan 2019, 10:22 PM
africana
africana - avatar