K
Kai Thorsrud
Hi,
I'm a selv learned developer and I have a few years of experience with VB6,
ASP, PHP and such.
I've dug into coding with VB.NET and this language simply amazes me. I
really LOVE this language. I've read some Java and i have tried to learn
java but really haven't gotten the time yet so i know a bit OO. ( i tend to
fall back to languages i know i guess but i see that .Net is worth
learning for me )
However i have never really understood events. I understand what an event is
and why those beautiful things exists but i don't see the big picture
yet.
I've created a class that implements the fileSystemWatcher and i have added
handlers to trigger on change, rename and delete of a logfile.
What i don't understand is when the events will be triggered and for how
long they will be triggered and such. This class is going to be one of many
classes that are tied up to a NTService.
If i create an instance of my class in my main program (the NT Service) will
the events trigger as long as the instance exists (i guess not) or will the
events trigger only when i'm inside the function that sets
oWatcherFileWatcher.EnableRaisingEvents = True ?
I guess i need to extend my class with my own events ? Can someone point me
to eighter a book that covers this topic well ? (i've got access to
www.books24x7.com hence i can read most books online) or a webpage ? I've
searched for the topic but most books just says events are nice blah blah
blah and show a simple example of an event but they don't show it all (i
guess it's possible to do what i want..... i hope? )
Thanks a lot
/Kai
I'm a selv learned developer and I have a few years of experience with VB6,
ASP, PHP and such.
I've dug into coding with VB.NET and this language simply amazes me. I
really LOVE this language. I've read some Java and i have tried to learn
java but really haven't gotten the time yet so i know a bit OO. ( i tend to
fall back to languages i know i guess but i see that .Net is worth
learning for me )
However i have never really understood events. I understand what an event is
and why those beautiful things exists but i don't see the big picture
yet.
I've created a class that implements the fileSystemWatcher and i have added
handlers to trigger on change, rename and delete of a logfile.
What i don't understand is when the events will be triggered and for how
long they will be triggered and such. This class is going to be one of many
classes that are tied up to a NTService.
If i create an instance of my class in my main program (the NT Service) will
the events trigger as long as the instance exists (i guess not) or will the
events trigger only when i'm inside the function that sets
oWatcherFileWatcher.EnableRaisingEvents = True ?
I guess i need to extend my class with my own events ? Can someone point me
to eighter a book that covers this topic well ? (i've got access to
www.books24x7.com hence i can read most books online) or a webpage ? I've
searched for the topic but most books just says events are nice blah blah
blah and show a simple example of an event but they don't show it all (i
guess it's possible to do what i want..... i hope? )
Thanks a lot
/Kai