In C#, the new keyword can be used as an operator or as a modifier.
new operator Used to create objects on the heap and invoke constructors.
new modifier Used to hide an inherited member from a base class member.
he new operator is used to create objects and invoke constructors,For
example
Class1 MyClass = new Class1();
It is also used to invoke the default constructor for value types, for example:
int myInt = new int();
Premalatha
Software Engineer
Sivakumar.S, if this helps please login to Mark As Answer. | Alert Moderator