ByVal Replacement for String?

  • Thread starter Thread starter lucius
  • Start date Start date
L

lucius

I have a class with a String property. I wonder if there is something
that can hold the same alphanumeric data that is a "byval" class like
an int... Is there?

Thanks.
 
IMO your best bet is to start by explaining what is the problem you are
trying to solve.

I'm not sure to really understand what solution you came up with. It looks
like you are trying to find a string datatype that would be a "value type"
instead of a "reference type" ??? (the byval keyword is still something
else).
 
Yes, I meant an alphanumeric alternative to String because it is a
"reference type" and I want a "value type".

Thanks and sorry for any confusion.
 
lucius said:
Yes, I meant an alphanumeric alternative to String because it is a
"reference type" and I want a "value type".

Thanks and sorry for any confusion.

What do you intend to achieve using a value type string lookalike?
Strings are immutable, so they can be used almost as if they were value
types in the first place.
 
Hi Lucius,

Yes, as Jon has said, the .NET framework string type is immutable which
just act like a value type in copy and accessing though it is an reference
type. Would you provide some detail code snippet demonstrate the problem
you meet so that we can get some clear view and dig it further?

http://channel9.msdn.com/ShowPost.aspx?PostID=60365

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top