Emulating behaviour of C# string

Tech-Archive recommends: Fix windows errors by optimizing your registry



I plan to write a class representing a particular type of string from an
obsolete machine architecture. It involves a non-ASCII character set and
has some rendering quirks such as "characters" that expand to reserved
words when displayed.

If possible, I'd like my string class to behave like a value type
insofar as the standard C# string does. For instance, if someone passes
a MyString instance to another method, and that method changes
properties of the instance, I'd rather not have those changes propagated
back to the caller.

Is this feasible? If so, I'd appreciate any pointers on how to do it,
but I suspect that the C# string (as a built-in part of the language)
can probably take liberties that I can't.

Eq.


.



Relevant Pages

  • Re: Emulating behaviour of C# string
    ... obsolete machine architecture. ... I'd like my string class to behave like a value type insofar ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: What would you do?
    ... This method changes a string value to empty if it has a null value. ... If you have already implemented the method as an instance method, then I'd leave it that way. ... If you decide to make it static anyway then be sure to change all invocations to use the static invocation syntax ); ...
    (comp.lang.java.programmer)
  • Re: What would you do?
    ... This method changes a string value to empty if it has a null value. ... >synchronization.. ... I find it a sore to always to instantiate the helper class. ...
    (comp.lang.java.programmer)
  • What would you do?
    ... This method changes a string value to empty if it has a null value. ... synchronization.. ... I find it a sore to always to instantiate the helper class. ...
    (comp.lang.java.programmer)