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 does break do in loop?
How is lazy loading achieved?
Does c# support c type macros?
what is the index value of the first element in an array?
What is the difference between IEnumerator and IEnumerable?
How do I open the console?
What is dataview c#?
To whom a method is accesssed if it is marked as protected internal ?
What do you mean by jagged arrays in c#?
What is the main purpose of xml?
What is a thread? What is multithreading?
For read-only operation which property you have to designated?
How do you declare a variable in c#?
Is python easier than c#?
How do I stop my console from closing in c#?