473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Question: Referencing property in delagate function

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!
Nov 20 '05 #1
1 960
i could be wrong but why do you use a shared property ?
shouldnt that be a public property?
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
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!

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon | last post by:
Am using the following code. <script language="JavaScript1.2"> function setquantity(productindex,productquantity) { //create the reference object irefname_none = eval("document." +...
2
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button...
15
by: designconcepts | last post by:
bo'jour, bo'jour, So I have question to present to the forum about OOD. This is a Csharp forum, but C# is the lang of choice and the question is an exercise based on some comments by the chief...
6
by: wASP | last post by:
Hello everyone, I'm new to C# and ASP.NET, so pardon my stupidity on this one. I'm having a problem with referencing methods/functions external to a class member function. My code is as...
24
by: Tiraman | last post by:
Hi, I Build my own dll with my own namespace name and i would like to put it in one place but for the project bin folder so all of the projects will be able to use it . i tried to put the dll...
10
by: Nemisis | last post by:
HI everyone, I think i am on the right path but if someone could confirm it, that would be great. In my business Layer i have my business object, for this example, called User. User has...
2
by: JJA | last post by:
I'm looking at some code I do not understand: var icons = new Array(); icons = new GIcon(); icons.image = "somefilename.png"; I read this as an array of icons is being built. An element of...
5
by: =?Utf-8?B?Y2FsZGVyYXJh?= | last post by:
Dear all, I have a strange behaviour on the use of delagate. I will try to explain. I have an assembly (Lets call it AssmDB) which contains database function operation like Insert, Delete,...
20
by: tshad | last post by:
Using VS 2003, I am trying to take a class that I created to create new variable types to handle nulls and track changes to standard variable types. This is for use with database variables. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.