What is New modifiers?
Samir Bhogayta
Select an image from your device to upload
The new keyword explicitly hides a member that is inherited from a base class. When you hide an inherited member, the derived version of the member replaces the base class version.
public class BaseC{ public int x; public void Invoke() { }}public class DerivedC : BaseC{ new public void Invoke() { }}
In this example, BaseC.Invoke is hidden by DerivedC.Invoke.