Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
GeneralRe: Referencing a reference Pin
Furty4-Aug-03 9:16
Furty4-Aug-03 9:16 
GeneralRe: Referencing a reference Pin
Martin Cross4-Aug-03 22:13
Martin Cross4-Aug-03 22:13 
GeneralRe: Referencing a reference Pin
Furty5-Aug-03 1:02
Furty5-Aug-03 1:02 
GeneralRe: Referencing a reference Pin
Martin Cross5-Aug-03 3:07
Martin Cross5-Aug-03 3:07 
GeneralRe: Referencing a reference Pin
Furty5-Aug-03 14:10
Furty5-Aug-03 14:10 
GeneralRe: Referencing a reference Pin
Heath Stewart4-Aug-03 6:11
protectorHeath Stewart4-Aug-03 6:11 
GeneralRe: Referencing a reference Pin
Martin Cross4-Aug-03 6:24
Martin Cross4-Aug-03 6:24 
GeneralRe: Referencing a reference Pin
Heath Stewart4-Aug-03 6:34
protectorHeath Stewart4-Aug-03 6:34 
What collection class are you using? I do this quite a bit in our application using provided classes and custom classes and have never had problems. So long as I add the TextBox object's reference to the collection itself, it's no big deal.

Are you by change passing a reference to the string in TextBox.Text?

Also, what you're describing is property data-binding. You can bind properties of objects to properties of other objects, or even to collections of objects (happens a lot in ASP.NET). You could use textBox1.DataBindings.Add("Text", this, "Text").

If the Text property of your control is supposed to modify the TextBox's Text property, why not just do this?
public class MyControl : UserControl
  private TextBox textBox1;
  // ...
  public string Text
  {
    get { return this.textBox1.Text; }
    set { this.textBox1.Text = value; }
  }
}

...although maybe I'm not understanding you right.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
QuestionHow to get system-wide cursor status in c#? Pin
CyberKewl3-Aug-03 22:02
CyberKewl3-Aug-03 22:02 
AnswerRe: How to get system-wide cursor status in c#? Pin
J. Dunlap3-Aug-03 22:34
J. Dunlap3-Aug-03 22:34 
GeneralRe: How to get system-wide cursor status in c#? Pin
CyberKewl4-Aug-03 4:25
CyberKewl4-Aug-03 4:25 
GeneralAbout some syntax Pin
FlyingDancer3-Aug-03 21:40
FlyingDancer3-Aug-03 21:40 
GeneralRe: About some syntax Pin
Alexander Kojevnikov3-Aug-03 22:41
Alexander Kojevnikov3-Aug-03 22:41 
GeneralRe: About some syntax Pin
FlyingDancer3-Aug-03 23:03
FlyingDancer3-Aug-03 23:03 
GeneralRe: About some syntax Pin
Alexander Kojevnikov4-Aug-03 2:42
Alexander Kojevnikov4-Aug-03 2:42 
GeneralRe: About some syntax Pin
FlyingDancer4-Aug-03 2:55
FlyingDancer4-Aug-03 2:55 
GeneralReturn possibilty Pin
deanoA3-Aug-03 16:33
deanoA3-Aug-03 16:33 
GeneralRe: Return possibilty Pin
James T. Johnson3-Aug-03 16:59
James T. Johnson3-Aug-03 16:59 
GeneralRe: Return possibilty Pin
Furty3-Aug-03 17:04
Furty3-Aug-03 17:04 
GeneralRe: Return possibilty Pin
James T. Johnson3-Aug-03 17:10
James T. Johnson3-Aug-03 17:10 
GeneralRe: Return possibilty Pin
Furty3-Aug-03 17:24
Furty3-Aug-03 17:24 
GeneralRe: Return possibilty Pin
Furty3-Aug-03 17:00
Furty3-Aug-03 17:00 
GeneralRe: Return possibilty Pin
James T. Johnson3-Aug-03 17:03
James T. Johnson3-Aug-03 17:03 
GeneralRe: Return possibilty Pin
Furty3-Aug-03 17:09
Furty3-Aug-03 17:09 
GeneralRe: Return possibilty Pin
deanoA3-Aug-03 17:03
deanoA3-Aug-03 17:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.