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
Can we inherit abstract class in c#?
Explain the difference between boxing and unboxing.
What are custom exceptions in C#?
Is array immutable in c#?
How do you read an Excel sheet in C#?
What is int32?
What is difference between field and property in c#?
What is a service layer c#?
What are the 3 types of comments in c#?
Why ienumerable is used in c#?
What does addressof operator do in background ?
What does it mean?
What are access modifiers used for?
What exactly happens when we debug and build the program?
What is the task perform by clr?