what is the purpose of new keyword while creating an object?
Answers were Sorted based on User's Feedback
Answer / vasantha
new keyword is used the memory is allocated at runtime for
object
Is This Answer Correct ? | 19 Yes | 2 No |
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 |
Answer / mahendra
creating object memory and non static variable memory with default
Is This Answer Correct ? | 0 Yes | 0 No |
What is use of abstract class in c#?
What does console readline do in c#?
Are structs faster than classes?
Can you inherit multiple interfaces?
Write code for palindrome?
Why do we write system in c#?
What does clr stand for?
How can you sort the elements of the array in descending order?
Is it possible to have different access modifiers on the get/set methods of a property in c#?
How can we Achieve Late binding in C#.Can any give one example.
Are attributes inherited c#?
What is the use of functional interface?