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


Please Help Members By Posting Answers For Below Questions

Which are the access modifiers available in c#?

519


Define satellite Assembly in .NET?

555


What is whitespace in c#?

490


If dll and exe files are same it means you can deploy both the files in gac?

493


What is difference between ienumerable and list in c#?

445






What is iformatprovider in c#?

493


What is private and shared assembly?

544


What are sorted lists?

500


How can we set class to be inherited, but prevent the method from being over-ridden?

532


Can class be protected in c#?

515


What are All kind of access specifiers for a class and for methods

549


What is a .exe extension files? How is it similar to .dll extension files?

574


What are generics in c#.net?

606


Define a class and an object?

556


What is a singleton unity?

554