Why is the virtual keyword used in code? Technology Community › Category: OOP › Why is the virtual keyword used in code? 0 Vote Up Vote Down VietMX Staff asked 4 years ago The virtual keyword is used while defining a class to specify that the methods and the properties of that class can be overridden in derived classes.