Adding comments above each function
This commit is contained in:
parent
c9683c31a8
commit
313504f690
Binary file not shown.
@ -94,48 +94,56 @@ namespace LinqActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//1.) Write a LINQ query that returns all patients over the age of 30 in the "Patients" list
|
||||||
public static List<Patient> AllPatientsOver30(List<Patient> patients)
|
public static List<Patient> AllPatientsOver30(List<Patient> patients)
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//2.) Write a LINQ query that takes the patients in the Patients list, and returns a string of their names separated by a comma
|
||||||
public static string AllPatientNames(List<Patient> patients)
|
public static string AllPatientNames(List<Patient> patients)
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//3.) Write a LINQ query that returns the average weight of all patients in the Patients list
|
||||||
public static decimal AverageWeightOfAllPatients(List<Patient> patients)
|
public static decimal AverageWeightOfAllPatients(List<Patient> patients)
|
||||||
{
|
{
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//4.) Write a LINQ query that orders the list of patients in the Patients list by DateCreated and returns the most recent
|
||||||
public static Patient MostRecentPatientCreated(List<Patient> patients)
|
public static Patient MostRecentPatientCreated(List<Patient> patients)
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//5.) Write a LINQ Query that concatenates the two lists of patients together
|
||||||
public static List<Patient> ConcatPatientLists(List<Patient> patients, List<Patient> transferPatients)
|
public static List<Patient> ConcatPatientLists(List<Patient> patients, List<Patient> transferPatients)
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//6.)Given the last of transferParentNames below, write a LINQ Query within DistinctTransferPatients that returns a list of distinct names
|
||||||
public static List<String> DistinctTransferPatients(List<String> transferPatientNames)
|
public static List<String> DistinctTransferPatients(List<String> transferPatientNames)
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//7.) Write a LINQ Query that checks if the list of patients contains ANY patients with the name "Joe"
|
||||||
public static bool ContainsJoe(List<Patient> patients)
|
public static bool ContainsJoe(List<Patient> patients)
|
||||||
{
|
{
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//8.) Write a LINQ Query that TAKEs the first 3 patients in the patient list
|
||||||
public static List<Patient> First3Patients(List<Patient> patients)
|
public static List<Patient> First3Patients(List<Patient> patients)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user