Is string a value type or a reference type?

Answer Posted / albn

String is a reference type. If two string variable has the
same string it stored in the same heap memory address.

eg in VB.Net
Dim a as string="Hello"
dim b as string="Hello"

both variable refer to same memory address. As strings are
immutable reference type you can't get the change in one
variable to another.

Is This Answer Correct ?    19 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know using sql cache invalidation?

525


How many types of Cookies are available in ASP.NET?

578


Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?

1896


Give some salient points of difference between request processor and request dispatcher.

610


a web application needs to be created to accept the product name and quantity of a toy from a customer. After the customer has entered the product name the application needs to display the discounted price of the product to the customer (company is offering 35% discount on all products). The application should allow the customer to select the product name from a list box. and also while i'm data binding to a label with custom data binding with some declarations : "The Discounted Price is "+((System.Convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)) - ((System.convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)*0.35)). Where i need to give this declaration in asp.net 2.0.

1432






How dataadapter.fill works?

558


How does cookies work in asp net?

505


What is form submit?

516


What are the advantages and disadvantages of Using Cookies?

514


What is the advantage of using Windows authentication in a Web application?

550


How would you turn off cookies on a page of a website?

500


Define reflection in .net?

554


I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?

1453


What is the use of web.config and machine.config files?

620


Suppose You Want A Certain Asp.net Function Executed On Mouseover For A Certain Button. Where Do You Add An Event Handler?

641