Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

maintain string reference

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Wong - 15 Jul 2006 12:08 GMT
Hi,

I would like to have a string point to another one.
What I mean is I want the pointing to change value whenever the pointed
one is changed. How can I do it?

Example:

string orgString = "Original string";
string ptrString = orgString;

orgString = "New string";

// Now, we have ptrString == "Original string"

// I would instead want this:
// ptrString == "New string"
Michael Nemtsev - 15 Jul 2006 14:24 GMT
Hello Michael,

That's because strings are immutable. You need to use StringBuilder for that

I recoment you to read this http://www.yoda.arachsys.com/csharp/strings.html

MW> would like to have a string point to another one.
MW> What I mean is I want the pointing to change value whenever the
MW> pointed
MW> one is changed. How can I do it?
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.