Re: Generics with List and Delegates?
- From: "Joanna Carter [TeamB]" <joanna@xxxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 19:45:35 +0100
"Cedric Rogers" <cedricrogers@xxxxxxxxxxxxxxxx> a écrit dans le message de
news: 916E138B-3E55-491B-8437-B9F8E8D316A1@xxxxxxxxxxxxxxxx
|I wasn't sure if I could do this. I believe I am stretching the capability
of
| what generics can do for me but here goes.
|
| I have a generic delegate defined as
| public delegate bool RuleDelegate<T>(T item);
|
| In my class my goal is to use a generic list collection to contain my
| generic delegates. This will allow me to pass this List to another
library
| and call this list of functions. This could provide a new way to build
rule
| base engines in .NET if this is possible thus being independant of
| implementation. Is this possible with .NET 2.0?
As far as I have been able to ascertain, it is not possible to have a list
of generic delegates, they would have to be bound to one particular type.
However, I would be grateful to find that I am wrong, because it is
something that I had hoped to do.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer
.
- Prev by Date: I can obtain Where clauses, order by, group by, of a consultation SQL??
- Next by Date: Re: picturebox detect pixel color
- Previous by thread: I can obtain Where clauses, order by, group by, of a consultation SQL??
- Next by thread: Re: Generics with List and Delegates?
- Index(es):
Relevant Pages
|