Re: newbie: string reference
From: Bruce Wood (brucewood_at_canada.com)
Date: 03/18/05
- Previous message: JV: "Re: Need numericUpDown to contain Int"
- In reply to: sklett: "newbie: string reference"
- Next in thread: KH: "Re: newbie: string reference"
- Reply: KH: "Re: newbie: string reference"
- Reply: sklett: "Re: newbie: string reference"
- Messages sorted by: [ date ] [ thread ]
Date: 18 Mar 2005 13:49:32 -0800
When you say
string a;
a _is_ a reference. Perhaps if you would give more information about
what you hope to do with string references, we could give you more
help.
By the way, if what you want is to pass a string into a method, and
upon return have it change to a different string, you can do this using
ref:
private void MyMethod(ref string x)
{
x = "Goodbye";
}
string a = "Hello";
MyMethod(ref a);
// At this point a will be "Goodbye".
- Previous message: JV: "Re: Need numericUpDown to contain Int"
- In reply to: sklett: "newbie: string reference"
- Next in thread: KH: "Re: newbie: string reference"
- Reply: KH: "Re: newbie: string reference"
- Reply: sklett: "Re: newbie: string reference"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|