Why string are called Immutable data Type

Answer Posted / kirti

The memory representation of string is an Array of Characters, So on re-assigning the new array of Char is formed & the start address is changed . Thus keeping the Old string in Memory for Garbage Collector to be disposed.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain model, controller and view in mvc?

655


Explain how to use multiple submit buttons in ASP.Net MVC?

727


What are non action methods in mvc?

630


explain why t4 entity is important in entity framework?

654


What is .net framework in simple terms?

634






Is it possible to share a view across multiple controllers?

619


What is an asynchronous controller in asp.net mvc?

620


Can we free memory explicitly without waiting for garbage collector to free the memory in .net compact framework?

622


Can you set the unlimited length for "maxjsonlength" property in config?

649


What is the advantage of using asp.net routing?

678


How can I tell what .net framework is installed?

607


Name a few different return types of a controller action method?

634


What is the full form of sp?

574


List out few different return types of a controller action method?

698


Briefly describe the roles of clr in .net framework?

636