Click here to Skip to main content
16,006,845 members
Home / Discussions / C#
   

C#

 
AnswerRe: Get & Set Pin
NaNg1524129-Aug-06 22:40
NaNg1524129-Aug-06 22:40 
AnswerRe: Get & Set Pin
vikas amin29-Aug-06 23:44
vikas amin29-Aug-06 23:44 
AnswerThanks to all Pin
Legolas_Bilbao30-Aug-06 2:39
Legolas_Bilbao30-Aug-06 2:39 
GeneralRe: Thanks to all Pin
eggsovereasy30-Aug-06 3:34
eggsovereasy30-Aug-06 3:34 
GeneralRe: Thanks to all Pin
Legolas_Bilbao30-Aug-06 23:14
Legolas_Bilbao30-Aug-06 23:14 
QuestionUser Control properties? Pin
kbalias29-Aug-06 20:58
kbalias29-Aug-06 20:58 
QuestionUsing CRViewer Control From Form2 Pin
M Riaz Bashir29-Aug-06 20:39
M Riaz Bashir29-Aug-06 20:39 
QuestionEvent handler Maddness Pin
Squeaker29-Aug-06 20:02
Squeaker29-Aug-06 20:02 
I am trying to understand how to hook up some event handlers. Here is an analogy to my situation: I have an object tree that represents all passenger trains in a train station. It looks like this:

<br />
Station<br />
.....Trains<br />
.........Train_0<br />
..............Cars<br />
................Car_0<br />
...................Passengers<br />
..........................Passenger_0 <br />
..........................Passenger_1<br />
.........Train_1  <br />
..............etc...<br />


Each of these objects fire events (like when passengers board a car).

I have a Form where I want to display status of Trains, Cars, Passengers etc.
I need to attach the handlers in the Form, but must be done dynamically, and I have no clue.

For testing I tried this, but I get a runtime error if the collections are empty:

<br />
Station.Trains[1].Cars[5].CarsChanged += new CarsChangedEventHandler(Cars_Changed);<br />


I have spent a good bit of time searching for info. Any suggestions would most helpful. I'm guessing that C# has an elegant solution (in lieu of my duck tape).

Thanks in advance-
AnswerRe: Event handler Maddness Pin
mav.northwind29-Aug-06 20:40
mav.northwind29-Aug-06 20:40 
AnswerRe: Event handler Maddness Pin
beatles169229-Aug-06 20:44
beatles169229-Aug-06 20:44 
GeneralRe: Event handler Maddness Pin
Squeaker30-Aug-06 3:20
Squeaker30-Aug-06 3:20 
AnswerRe: Event handler Maddness Pin
Andrei Ungureanu29-Aug-06 23:46
Andrei Ungureanu29-Aug-06 23:46 
GeneralRe: Event handler Maddness Pin
Squeaker30-Aug-06 3:16
Squeaker30-Aug-06 3:16 
GeneralRe: Event handler Maddness Pin
Andrei Ungureanu30-Aug-06 5:08
Andrei Ungureanu30-Aug-06 5:08 
QuestionInserting Special Symbols in RichTextBox & Store in DB Pin
Chetan Ranpariya29-Aug-06 19:29
Chetan Ranpariya29-Aug-06 19:29 
QuestionHow can i get the Url Title ? and a Q about axWebBrowser1_TitleChange Pin
vedmack29-Aug-06 19:26
vedmack29-Aug-06 19:26 
Questionplz help me,i want some example programs on accessing the xml file in C#.Net2003 Pin
premkamalg29-Aug-06 19:02
premkamalg29-Aug-06 19:02 
AnswerRe: plz help me,i want some example programs on accessing the xml file in C#.Net2003 Pin
rah_sin29-Aug-06 20:11
professionalrah_sin29-Aug-06 20:11 
AnswerRe: plz help me,i want some example programs on accessing the xml file in C#.Net2003 Pin
coolestCoder29-Aug-06 20:21
coolestCoder29-Aug-06 20:21 
AnswerRe: plz help me,i want some example programs on accessing the xml file in C#.Net2003 Pin
Kevin McFarlane29-Aug-06 23:00
Kevin McFarlane29-Aug-06 23:00 
GeneralRe: plz help me,i want some example programs on accessing the xml file in C#.Net2003 Pin
vikas amin29-Aug-06 23:32
vikas amin29-Aug-06 23:32 
AnswerRe: plz help me,i want some example programs on accessing the xml file in C#.Net2003 Pin
Andrei Ungureanu29-Aug-06 23:51
Andrei Ungureanu29-Aug-06 23:51 
QuestionArabic input in Textbox Pin
Symbul29-Aug-06 14:38
Symbul29-Aug-06 14:38 
AnswerRe: Arabic input in Textbox Pin
Naes30-Aug-06 13:21
Naes30-Aug-06 13:21 
QuestionHow to avoid escaping char < while serialization? Pin
global warming29-Aug-06 13:43
global warming29-Aug-06 13:43 

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.