Is string reference type / value type ?

Answer Posted / ankur sehgal

string is reference type but it behaves as value
type.Because every time u assign a value to string a new
object is created.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a method and a property?

698


Can constructor be protected in c#?

716


What is instantiating a class in c#?

702


What are the properties of a string class?

719


Can derived classes have greater accessibility than their base types?

760


What is the data type for bit in c#?

727


Is array ienumerable c#?

682


What does console readline do?

675


Describe an abstract class?

772


What is a sealed class?

697


Is it possible to have different access modifiers on the get/set methods of a property?

740


Illustrate the differences between the system.array.copyto() and system.array.clone()?

730


Is there an equivalent to the instanceof operator in visual j++?

771


Explain the difference between abstract class and interface.

887


Can you create sealed abstract class in c#?

677