Click here to Skip to main content
15,897,315 members
Home / Discussions / C#
   

C#

 
GeneralWebService Vs Remoting Pin
CillyMe8-Nov-03 16:50
CillyMe8-Nov-03 16:50 
GeneralRe: WebService Vs Remoting Pin
WillemM8-Nov-03 23:40
WillemM8-Nov-03 23:40 
GeneralRe: WebService Vs Remoting Pin
SimonS9-Nov-03 1:52
SimonS9-Nov-03 1:52 
GeneralRe: WebService Vs Remoting Pin
LongRange.Shooter10-Nov-03 5:24
LongRange.Shooter10-Nov-03 5:24 
GeneralDataSet Vs RecordSet Pin
CillyMe8-Nov-03 16:45
CillyMe8-Nov-03 16:45 
GeneralFile Open Dialog Question Pin
Jeff Patterson8-Nov-03 16:33
Jeff Patterson8-Nov-03 16:33 
QuestionLAME MP3 Encoder ... in C# ? Pin
Dato8-Nov-03 15:08
Dato8-Nov-03 15:08 
QuestionTag Property References? Pin
Tym!8-Nov-03 14:05
Tym!8-Nov-03 14:05 
I have Class A with Properties Foo and Bar and
Class B which has an indexer to an Array of Class A objects.

I have a button for each element in B's array of A's.
I want to refer to these A objects through the Tag property of each button:

<br />
private B b = new B(2);<br />
// contructs array[2] of Class A objects, but both are null<br />
<br />
button1.Tag = b[0];<br />
button2.Tag = b[1];<br />


I think my problem lies in the fact that many times the elements in the array will be null, which leaves the tags as null. I would like the tag, however, to refer to the space in the array in the Class B object, so I can do something like :

<br />
(A)button1.Tag = new A(FOO, BAR);<br />


thereby creating a new Class A object within b's array. Along with this I would like to be able to set the properties like:

<br />
((A)button2.Tag).Foo = NEWFOO;<br />



I come from C++ so I always think in pointers. Do I need pointers to do this, or just a different approach?

Tym!
GeneralTwo Questions for the Guru's Pin
bscott31258-Nov-03 9:58
bscott31258-Nov-03 9:58 
GeneralRe: Two Questions for the Guru's Pin
MultiThread8-Nov-03 10:35
MultiThread8-Nov-03 10:35 
GeneralRe: Two Questions for the Guru's Pin
jparsons8-Nov-03 12:01
jparsons8-Nov-03 12:01 
GeneralRe: Two Questions for the Guru's Pin
Sphynx_Roland19-Nov-03 8:54
Sphynx_Roland19-Nov-03 8:54 
GeneralActiveX and .NET Pin
Anonymous8-Nov-03 8:48
Anonymous8-Nov-03 8:48 
GeneralRe: ActiveX and .NET Pin
MultiThread8-Nov-03 10:44
MultiThread8-Nov-03 10:44 
GeneralRe: ActiveX and .NET Pin
Stephane Rodriguez.9-Nov-03 5:55
Stephane Rodriguez.9-Nov-03 5:55 
GeneralAssigning UserControl icon Pin
Den2Fly8-Nov-03 8:32
Den2Fly8-Nov-03 8:32 
GeneralRe: Assigning UserControl icon Pin
Nick Parker8-Nov-03 9:17
protectorNick Parker8-Nov-03 9:17 
GeneralRe: Assigning UserControl icon Pin
Anonymous8-Nov-03 10:29
Anonymous8-Nov-03 10:29 
GeneralRe: Assigning UserControl icon Pin
Nick Parker8-Nov-03 11:23
protectorNick Parker8-Nov-03 11:23 
GeneralWindows Registry Pin
Amirjalaly8-Nov-03 6:44
Amirjalaly8-Nov-03 6:44 
GeneralRe: Windows Registry Pin
David Stone8-Nov-03 6:48
sitebuilderDavid Stone8-Nov-03 6:48 
Generala special kind of operator Pin
WillemM8-Nov-03 5:28
WillemM8-Nov-03 5:28 
GeneralRe: a special kind of operator Pin
MultiThread8-Nov-03 5:43
MultiThread8-Nov-03 5:43 
GeneralRe: a special kind of operator Pin
David Stone8-Nov-03 6:45
sitebuilderDavid Stone8-Nov-03 6:45 
GeneralRe: a special kind of operator Pin
MultiThread8-Nov-03 6:57
MultiThread8-Nov-03 6:57 

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.