what is the purpose of new keyword while creating an object?
Answer Posted / noor mohammad
Types cannot be used without being instantiated. To
instantiate a type, you use the new operator, which invokes
the logic specified in the constructor. After completion,
the constructor returns a new instance of the specified
type—this instance can now store data as your C# program
executes.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is generic types in c#?
What will be the output of the following code?
What is the difference between “dispose” and “finalize” variables in c#?
What is a type c#?
What is pure abstract class in c#?
What are the types of serialization?
In which way you can convert a value-type to a reference-type?
What is difference between sleep () and wait ()?
What is the use of static members with example using c#.net.
What is a constructor in c#?
Write one code example for compile time binding and one for run time binding? What is early/late binding?
What are the namespace level elements?
In how many ways you can overload a method?
How do I do a case-insensitive string comparison?
What is primitive types in c#?