GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Microsoft  >  Microsoft.NET

 Print  |  
Question:  What is meant by Mutable and Immutable classes?



March 03, 2007 09:06:33 #1
 kvmahesh_ukt   Member Since: Visitor    Total Comments: N/A 

RE: What is meant by Mutable and Immutable classes?
 
 Immutable type are types whose instance data, fields and properties, does not change after the instance is created. Most value types are immutable, but the mutable type are A type whose instance data, fields and properties, can be changed after the instance is created. Most Reference Types are mutable.

Shortly we can say as:

  When you have a reference to an instance of an object, the contents of that instance can be altered  for Mutable objects and When you have a reference to an instance of an object, the contents of that instance cannot be altered  for Immutable objects.
     

 

Back To Question