private string listBadValues(Dicts dicts, Regex r) { var allWords = new List <string>(); var type1 = dicts.GetType(); var allFields = type1.GetFields(BindingFlags.Instance | BindingFlags.NonPublic); var fields = allFields.Where(fi => fi.FieldType == typeof(List <string>)); foreach (var field in fields) { List <string> list = field.GetValue(dicts) as List <string>; allWords.AddRange(list); } var s1 = string.Join(",", allWords.FindAll(x => !r.IsMatch(x))); return($" BAD VALUES: \n\n\n {s1} \n\n\n\n"); }