J
Jeff0803
Guest
I have a method which return a bool value found from patientlist's item found by patientid.
Here is the code.
public bool GetAvoidReminder(long patientid, List<Patient> patientlist)
{
foreach (Patient patient in patientlist)
{
if (patient.PatientID == patientid)
{
return (patient.AvoidReminder);
}
}
return (false);
}
Calling part is like following.
bool bret = GetAvoidReminder(patientid, patientlist);
I'd like to simplify these code using Lambda Expression or other way.
Can anybody give me any advice?
Continue reading...
Here is the code.
public bool GetAvoidReminder(long patientid, List<Patient> patientlist)
{
foreach (Patient patient in patientlist)
{
if (patient.PatientID == patientid)
{
return (patient.AvoidReminder);
}
}
return (false);
}
Calling part is like following.
bool bret = GetAvoidReminder(patientid, patientlist);
I'd like to simplify these code using Lambda Expression or other way.
Can anybody give me any advice?
Continue reading...