Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the use of New Keyword

Answers were Sorted based on User's Feedback



What is the use of New Keyword..

Answer / ruchi shrivastav

The New keyword is used to hide the method and crete memory
allocation and also used to define object of class.

Is This Answer Correct ?    0 Yes 0 No

What is the use of New Keyword..

Answer / ctharam

Objects can be created by using the new keyword followed by the name of the class that the object will be based on, like this:-
1) Customer object1 = new Customer();

NOTE:- When an instance of a class is created, a reference to the object is passed back to the programmer. In the previous example, object1 is a reference to an object that is based on Customer.

2) Customer object3 = new Customer();
Customer object4 = object3;

NOTE:- This code creates two object references that both refer to the same object. Therefore, any changes to the object made through object3 will be reflected in subsequent uses of object4. Because objects that are based on classes are referred to by reference, classes are known as reference types.

Is This Answer Correct ?    0 Yes 0 No

What is the use of New Keyword..

Answer / saran

The New keyword is used to create the object for the class, all properties are invoked

Is This Answer Correct ?    0 Yes 0 No

What is the use of New Keyword..

Answer / ashok

that Allocates memory at runtime instead of compile time

Is This Answer Correct ?    3 Yes 4 No

What is the use of New Keyword..

Answer / abdul rawoof.l

whenever objects create the new keyword constructor is immediately call.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Sharp Interview Questions

Difference between multi-level and multiple inheritance?

17 Answers   Microsoft,


Can struct have constructor c#?

0 Answers  


Is lazy thread safe c#?

0 Answers  


Distinguish between array and arraylist in c#?

0 Answers  


Why do we need singleton pattern in c#?

0 Answers  


What is the property of class?

0 Answers   Wipro,


Explain About multi level and multiple inheritance how to achieve in .net

0 Answers  


What do you mean by default constructor?

0 Answers   NIIT,


Is string primitive?

0 Answers  


Can class be protected in c#?

0 Answers  


How many parameters can a method have c#?

0 Answers  


What is difference between comparable and comparator?

0 Answers  


Categories