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 difference between destruct or and garbage collection ?
What is difference between a constant and read-only in C#?
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
When a Static Constructor is called in a Class?
Can properties be overloaded in c#?
How do I edit a dll file?
Which is better python or c#?
What does immutable mean in c#?
What is difference between first and firstordefault?
What is jit? What are the different types of jit?
Is c# substring zero based?
What is use of hashtable in c#?
What is the difference between interface and abstract class in c#?
Is string null or empty?
Explain async and await?