Question: Referencing property in delagate function

V

VB Programmer

I have a custom timer class that I created (derived from
System.Timers.Timer). It has an extra shared property called CustomerName.

This is a portion of the code:
Dim t as New MyTimer("Bill Jones") ' send the timer the customer name
associated with this timer
AddHandler t.Elapsed, AddressOf TimerFired
t.Enabled = True

In my TimerFired code how do I access the value of the property called
"CustomerName"?

Thanks!
 
E

EricJ

i could be wrong but why do you use a shared property ?
shouldnt that be a public property?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top