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

Generic Function

T
Hi there,

I have a whole library of math functions which take a single double
argument and return a double argument. Now I need to overload all of
these functions to take a DataTable and return a DataTable which
contains the result of the original function called on each row.

For example:

double f2(double){

}

Apr 9 '07 #1
2 2030
What specifically is your question?
--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"T" wrote:
Hi there,

I have a whole library of math functions which take a single double
argument and return a double argument. Now I need to overload all of
these functions to take a DataTable and return a DataTable which
contains the result of the original function called on each row.

For example:

double f2(double){

}
Apr 9 '07 #2
All you will have to do is add the new method signatures. A Generic
function is not a good idea here, because you are doing math, and probably
rely heavily on operators, which you won't be able to access on the type
parameters in generic functions.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"T" <sw***********@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Hi there,

I have a whole library of math functions which take a single double
argument and return a double argument. Now I need to overload all of
these functions to take a DataTable and return a DataTable which
contains the result of the original function called on each row.

For example:

double f2(double){

}

Apr 9 '07 #3

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

Similar topics

3
by: Jim Newton | last post by:
hi all, i'm relatively new to python. I find it a pretty interesting language but also somewhat limiting compared to lisp. I notice that the language does provide a few lispy type nicities, but...
6
by: aurgathor | last post by:
Howdy, How do I pass some function a generic comparison function? I figured out one non-generic case, but since this code got parameter declarations in two places, it's obviously not generic....
17
by: Andreas Huber | last post by:
What follows is a discussion of my experience with .NET generics & the ..NET framework (as implemented in the Visual Studio 2005 Beta 1), which leads to questions as to why certain things are the...
5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
6
by: Urs Eichmann | last post by:
While experimenting with the Feb CTP Edition of VB 2005, I came across "generic procedures". You can write: Public Class Foo Public Sub MySub(Of tDisp As IDisposable)(ByVal vMyParm As Integer)...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
3
by: markww | last post by:
Hi, I have a wrapper around some 3rd party database library function. The pseudo code looks like the following - it is meant to open a table in a database, extract values from a table, then copy...
10
by: Egghead | last post by:
Hi all, Can someone kindly enough point me to some situations that we shall or "must" use Generic Class? I can foresee the Generic Method is powerful, but I can not find a single situation that...
3
by: anoopsr | last post by:
hI, IHave a doubt in writing a generic function in C. Say for Example, I need to add 2 numbers. 2 interger Numbers or 2 float Numbers using the same function add(). How do i call the add...
32
by: copx | last post by:
Why doesn't the C standard include generic function pointers? I use function pointers a lot and the lack of generic ones is not so cool. There is a common compiler extension (supported by GCC...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.