Reference Variable Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get a variable to act as a reference variable. Any
suggestions on how to achieve this in c#? The variable will be of type
TextBox.

Thanks in advance!
 
I do VB so I'm going to hork up the C# code

TextBox A = New TextBox();
TextBox B = New TextBox();
TextBox Ref;
Ref= A;
Ref=Text() = "TextBox A";
Ref= B;
Ref.Text() = "TextBox B";

The Ref variable here is a reference to whatever TextBox you assign it to.
Is that what you needed?

Chris
 
Henry said:
I am trying to get a variable to act as a reference variable. Any
suggestions on how to achieve this in c#? The variable will be of type
TextBox.

What exactly do you mean by "a reference variable"?
 
Back
Top