473,508 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to consolidate similar methods to one

Raj
Hi All,
I have a method call GetStationListenUrl that exists as three
overloaded methods

1) public static string GetUrl( int strength, string
strengthNavigateUrl, zzz.StreamRow[] sra, string bandName)

2) public static string GetUrl( int strength, string
strengthNavigateUrl, xxx.StreamsRow[] sra, string bandName)

3) public static string GetUrl( int strength, string
strengthNavigateUrl, yyy.StreamsRow[] sra, string bandName)

zzz, xxx, yyy have common fields that the above method will access.
How would I consolidate all these three methods to one GetUrl.

TIA
Raj
Nov 15 '05 #1
2 1271
Hi Raj,

I take it zzz, xxx and yyy are all separate classes, and therefore you need
to provide the overloaded methods to accommodate each class? Also, I'm
assuming that the first GetUrl you listed actually

Nov 15 '05 #2
Ooops! Pressed some random keyboard combo that actually sent the mail before
I had finished!

As I was saying....
"Raj" <ph*********@yahoo.com> wrote in message
news:26**************************@posting.google.c om...
zzz, xxx, yyy have common fields that the above method will access.
How would I consolidate all these three methods to one GetUrl.


I take it zzz, xxx and yyy all have an inner class/struct called StreamsRow,
or StreamRow (assuming there is a typo in the first GetUrl method?)? You
could get rid of the overloading by having one class called StreamRow which
is used by xxx,yyy and zzz classes, rather than having three separate inner
classes. If this isn't possible, then have all the inner classes implement a
common interface, being the collection of functions needed by the GetUrl
method.

Not sure if I missed something here!?

Tobes
Nov 15 '05 #3

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

Similar topics

11
1402
by: bearophileHUGS | last post by:
I have a class Surface with many methods. Working in the interactive window I receive an error like this when I write the wrong method name: >>> table.addGlas() Traceback (most recent call...
3
3992
by: Andrew Chanter | last post by:
I have a table containing multiple records per key. eg: 1 | John Smith 1 | Mary Brown 1 | Julie Grey 2 | Danny Pink 2 | Jill White I need to consolidate this into a single record for each...
2
7114
by: Antitax | last post by:
I have a database with more than 800 adress records Some of the are similar because some letters in the street adress for example are not identical, altough they point to the same adress. Does...
1
1625
by: Dalan | last post by:
Trying to determine the best approach to use in consolating multiple records in an Access 97 Db. The users submit updates in HTML format generated from a query that are in turn imported into a...
1
1420
by: deko | last post by:
How can I consolidate these two tables into a single view? Current: =TableA= fldP fldX =TableB= fldY
14
2011
by: --CELKO-- | last post by:
Can I get a little help? Given a very simple table of events, with their durations, I want to consolidate time periods for an event that (1) touch each other or (2) overlap each other. CREATE...
7
1278
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2 for windows application. I have 2 solutions that I would like to consolidate into and have just one installation .msi for them, is this possible? So I just just copy...
3
2440
by: AccessHunter | last post by:
CASE_ID BEFORE BETWEEN AFTER 53222 N N Y 53222 Y N N 53222 Y N N 53222 Y N N 53222 Y N N 53222 Y N ...
1
1337
by: preston3271 | last post by:
Greetings, everyone: I am working on a script that needs to sort some file that are similar as follows: ao0122_1.pdf bp8762_1.pdf cx0123_1.pdf du0001_1.pdf ao0122_2.pdf ...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7495
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5052
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.