471,318 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

Reference Variable Question

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!
Jul 21 '05 #1
2 990
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" <He***@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
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!

Jul 21 '05 #2
Henry <He***@discussions.microsoft.com> wrote:
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"?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Amr Mostafa | last post: by
4 posts views Thread by z_learning_tester | last post: by
51 posts views Thread by Kuku | last post: by
4 posts views Thread by =?Utf-8?B?QWxla3MgS2xleW4=?= | last post: by
68 posts views Thread by Jim Langston | last post: by
7 posts views Thread by pauldepstein | last post: by
12 posts views Thread by Bryan Parkoff | last post: by
275 posts views Thread by Astley Le Jasper | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.