Re: Delegates, not anonymous methods
- From: "Marc Gravell" <marc.gravell@xxxxxxxxx>
- Date: 6 Mar 2007 21:12:58 -0800
Note that there are conversion tools around - or you can simply
compile it (from VB) and look in "reflector" to see how the same code
is written in VB.Net and C#. But it should be something like below.
Marc
// field declaration
List<Field> fieldList;
// enumeration
void Test() {
foreach(Field fld in fieldList.FindAll(SearchSelOrKeyNotID)) {
// do stuff here
}
}
// predicate
private static bool SearchSelOrKeyNotID(Field f) {
return !f.IsIdentity && (f.IsSelected || f.IsKey);
}
.
- Follow-Ups:
- Re: Delegates, not anonymous methods
- From: RobinS
- Re: Delegates, not anonymous methods
- References:
- Delegates, not anonymous methods
- From: RobinS
- Delegates, not anonymous methods
- Prev by Date: Re: profiles in pop3 email
- Next by Date: Re: Array of System.Timers.timer - Assigning an object to timer
- Previous by thread: Delegates, not anonymous methods
- Next by thread: Re: Delegates, not anonymous methods
- Index(es):
Relevant Pages
|