Re: String Reference Type



A string can potentially contain a lot of data, and there's no telling what size a particular string might need to be.

Therefore, not only does it make little sense to try and store a string in a register or on the stack, or anything else you'd do with a value type, strings have always been pointers in traditional languages.

Why would it be a value type?

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"RN1" <rn5a@xxxxxxxxxxxxxx> wrote in message news:ed9a9b74-a8c9-47f4-ab87-38a6b3234b1c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If I am not mistaken, String is reference type. Can someone please
explain me why is it reference type & not value type?

.



Relevant Pages

  • Re: Concept ? about Modules vs Classes
    ... Keep in mind that in dotNet for every reference type ... Public Class DataClass ... Public Shared Sub getdata(ByVal ds as Dataset, ByVal SQLString As ... String, ByVal TableName as String) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Datasets? Properties? Values?
    ... Although string is a reference type, .NET has already included handling on ... Passing a reference type by value is just passing a pointer ... Public Property RefDataset() As DataSet ... > Dim FormNumber As String ...
    (microsoft.public.dotnet.framework)
  • Re: Datasets? Properties? Values?
    ... Although string is a reference type, .NET has already included handling on ... Passing a reference type by value is just passing a pointer ... Public Property RefDataset() As DataSet ... > Dim FormNumber As String ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Datasets? Properties? Values?
    ... Although string is a reference type, .NET has already included handling on ... Passing a reference type by value is just passing a pointer ... Public Property RefDataset() As DataSet ... > Dim FormNumber As String ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Datasets? Properties? Values?
    ... Although string is a reference type, .NET has already included handling on ... Passing a reference type by value is just passing a pointer ... Public Property RefDataset() As DataSet ... > Dim FormNumber As String ...
    (microsoft.public.dotnet.general)

Loading