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 Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?

552


What operators can be used to cast from one reference type to another without the risk of throwing an exception?

519


Name any three ways to pass parameters to a method in c#?

488


What is routing in c#?

464


What is the advantage of static class in c#?

511






Why do we need encapsulation in c#?

506


Why c# is called c sharp?

465


Explain the types of errors in c#?

483


What is xaml file in c#?

535


What are the namespace level elements?

503


Why do we need indexers in c#?

478


What are the properties of string?

489


How does split work in c#?

488


What are anonymous types in c#?

477


Which programming language is best for desktop applications?

461