Neville

Neville

  • NA
  • 1
  • 0

Wrapping a Predicate

Feb 20 2009 2:51 PM

Hello,

I want to wrap a predicate search function to make my code more readable.  I have the following, which functionally works just fine:

InstrumentArray[InstrumentArray.FindIndex(delegate(Instrument i) { return i.Name == "1234v1"; })].Name = "1234v2";

InstrumentArray is a List<Instrument>

Is there a way for me to do the following?

InstrumentArray.GetInstrument(Name == "1234v1").Name = "1234v2";

Thanks,

Neville