private string getWarnings(PsfPsyQAddresses addresses) { PropertyInfo psyQValue; string lineValue; StringBuilder warnings = new StringBuilder(); foreach (string label in XsfUtil.GetPsyQFunctionList()) { psyQValue = addresses.GetType().GetProperty(label); lineValue = (string)psyQValue.GetValue(addresses, null); if (String.IsNullOrEmpty(lineValue)) { warnings.AppendFormat(" Warning: {0} function not found.{1}", label, Environment.NewLine); } } return(warnings.ToString()); }