I would like to get the gender for calculations, for example the male and female options are in one column. I would like to get all male or all female for calculation.

I have a "computed property" which gives me list of all the items along with calculation. Here is the code:

partial void MeanFemale_Compute(ref string result) { // Set result to the desired field value int totalAge = 0; int count = 0; foreach (InsuranceQuotation i in his.DataWorkspace.ApplicationData.InsuranceQuotations) { totalAge += i.mAge; count++; } if (count != 0) { result = (totalAge / count).ToString(); } }

How do I get to filter the gender in this "computed property".