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

delegates and typed datasets

Hi,

I have this delegate: public delegate DataSet TestDelegate1(string code);
But when I try to pass methods that return a typed dataset instead of a
regular dataset I get an error saying the method does not match the delegate.
Is there a way around that?

Thanks.
Nov 16 '05 #1
2 1632
Hi,

AFAIk the signature should be exact , think what would happen if you have
another delegate with the typed dataset as the return type, at compile time
which one to use?

the solution is fast though , just create another method with the correct
signature and make it return the correct type, like this

DataSet wrapper( string code)
{
return realMethod( code);
}

where realMethod return the typed dataset.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Magali Desmedt" <Ma***********@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.com...
Hi,

I have this delegate: public delegate DataSet TestDelegate1(string code);
But when I try to pass methods that return a typed dataset instead of a
regular dataset I get an error saying the method does not match the
delegate.
Is there a way around that?

Thanks.

Nov 16 '05 #2
Ok, thanks!

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

AFAIk the signature should be exact , think what would happen if you have
another delegate with the typed dataset as the return type, at compile time
which one to use?

the solution is fast though , just create another method with the correct
signature and make it return the correct type, like this

DataSet wrapper( string code)
{
return realMethod( code);
}

where realMethod return the typed dataset.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Magali Desmedt" <Ma***********@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.com...
Hi,

I have this delegate: public delegate DataSet TestDelegate1(string code);
But when I try to pass methods that return a typed dataset instead of a
regular dataset I get an error saying the method does not match the
delegate.
Is there a way around that?

Thanks.


Nov 16 '05 #3

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

Similar topics

0
by: Natehop | last post by:
I've been attempting to design an n-tiered framework leveraging .NET's strongly typed Dataset. My Framework will serve as the foundation to several client apps from Windows applications to web...
0
by: Bj?rn Mor?n | last post by:
I am consuming a web service that returns arrays of classes which can contain other classes (a hierarchy of data). Is there a simple way to move the data into a typed DataSet without writing too...
7
by: Tim Smith | last post by:
Hi, Is it possible to create a progam to mimic the following action a) drag oledbadapter to form1.cs b) select my oracle ole connection c) enter 'select * from mytable' d) create adapter for...
3
by: Rob Thomas | last post by:
Hi, I've been tasked to come up with a new architecture for a large application at one of my customer's sites. In the past, I have developed multi-tier applications whereby the business...
4
by: Ronald S. Cook | last post by:
I've always used untyped datasets. In a Microsoft course, it walks through creating typed datasets and harps on the benefits. It has you drag all these things around ..wizard, wizard, wizard......
3
by: Mike | last post by:
Hi, I'm delevloping a webservice that returns typed datasets with visual studio 2005. The problem is, that the typed data set in the client app is not the same as in the webservice. If I change...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
4
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their ...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.