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 the execution entry point for a c# console application?
What is the difference between static class and sealed class in c#?
Where is the main method in c#?
Can a constructor be private in c#?
What is the difference between an application domain and a process?
What is default constructor in c#?
What is the use of nullable types in c#?
What exactly is serverless?
Why dataset is used in c#?
What is concrete method in c#?
What is Web.config?
Can you have more than one namespace in c#?
Is c# code is unmanaged or managed code?
What is private variable?
what is the difference between a struct and a class in c#?