473,385 Members | 1,782 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,385 software developers and data experts.

Delegates: String or Integer

This is a continuation of the question "best way to randomly access my class
members".
I've figured out that I could use a delegate to accomplish this, but am not
sure how.
Some of the properties are Integers, while others are String.
Is there a way I can set up a Delegate so that I can do this?
I was hoping them that I could somehow push the delegates onto the
Hashtable. Would this work?

Jun 27 '06 #1
2 858
Hello HockeyFan,

It sounds like you haven't designed a well-thought-out system. Forgetting
about ramdom property access and delegates.. what exactly are you trying
to accomplish?

-Boo
This is a continuation of the question "best way to randomly access my
class
members".
I've figured out that I could use a delegate to accomplish this, but
am not
sure how.
Some of the properties are Integers, while others are String.
Is there a way I can set up a Delegate so that I can do this?
I was hoping them that I could somehow push the delegates onto the
Hashtable. Would this work?

Jun 27 '06 #2
I inherited it, so I'm stuck with the design.
As far as what I'm trying to accomplish, like I said, I'm given a dataset
with x number of rows, each containing a ResponseID and other information.
The responseIDs wont be in any order. When I get a response ID, I need to be
able to match it with the correct Property in the class. To accomplish this
for now, I have a gigantic select case statement matching ResponseIDs to the
properties. It works.

"GhostInAK" wrote:
Hello HockeyFan,

It sounds like you haven't designed a well-thought-out system. Forgetting
about ramdom property access and delegates.. what exactly are you trying
to accomplish?

-Boo
This is a continuation of the question "best way to randomly access my
class
members".
I've figured out that I could use a delegate to accomplish this, but
am not
sure how.
Some of the properties are Integers, while others are String.
Is there a way I can set up a Delegate so that I can do this?
I was hoping them that I could somehow push the delegates onto the
Hashtable. Would this work?


Jun 27 '06 #3

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

Similar topics

8
by: axxegfx | last post by:
newbie delegates question i'm using this code: sub empezar() Dim del As MyDelSub Dim del2 As MyDelSub Dim delAll As del = New MyDelSub(AddressOf hilo1) del2 = New MyDelSub(AddressOf hilo2)
0
by: Derek Martin | last post by:
Hi all, okay, I have never done delegates and invoke before but I *think* I am needing to now. I have a method called dosdt() that takes a while (code is below). It gets some data, then loops...
4
by: Jarod_24 | last post by:
What is the point with Delegates in VB.Net What can these things do that we can not allready do with the use of Interfaces, Events and Event handlers and so on... I'd like a discussion on this,...
2
by: mike604 | last post by:
I am learning vb.net but having trouble with this....: Essentially, I have 2 datagridview's on 2 different forms. I want one of the datagridviews to change based on what the user clicks of the...
3
by: Rich | last post by:
Hello, I recently started using delegates in my VB apps to handle asynchronous operations. Based on the examples that I followed, delegates appear to work in a similar way as Interfaces. ...
4
by: Dave | last post by:
Good morning, I have a class that must trigger an event in a module, which will in turn update a Label on a form. Due to being in a seperate thread,I must use a delegate. Now here is my...
7
by: Siegfried Heintze | last post by:
I'm studying the book "Microsoft Visual Basic.NET Language Reference" and I would like some clarify the difference between events and delegates. On page 156 I see a WinForms example of timer that...
7
balabaster
by: balabaster | last post by:
Okay, after having bashed my head against this long enough I thought of you guys... I thought having exhausted just about every other .NET concept I would come back to predicates because Microsoft's...
69
by: raylopez99 | last post by:
They usually don't teach you in most textbooks I've seen that delegates can be used to call class methods from classes that are 'unaware' of the delegate, so long as the class has the same...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.