what is the purpose of new keyword while creating an object?

Answers were Sorted based on User's Feedback



what is the purpose of new keyword while creating an object?..

Answer / vasantha

new keyword is used the memory is allocated at runtime for
object

Is This Answer Correct ?    19 Yes 2 No

what is the purpose of new keyword while creating an object?..

Answer / 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

what is the purpose of new keyword while creating an object?..

Answer / mahendra

creating object memory and non static variable memory with default

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How do you declare an arraylist?

1 Answers  


Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!

1 Answers   Siemens,


What is desktop example?

1 Answers  


Explain inheritance in c#?

1 Answers  


What is the difference between <c> and <code> xml documentation tag?

1 Answers  


Can an array be null c#?

1 Answers  


Is java better than c#?

1 Answers  


What is the ouput of the following program?

1 Answers  


What is a delegate? Explain.

1 Answers  


Is c# dictionary a hash table?

1 Answers  


What is a Managed Code??

1 Answers  


How to use nullable types in .net?

1 Answers  


Categories