public role AddRole(society soc, String Profession, String Description, DateTime StartedDate, String Affect, String Locn, String Country, String skills_list) { role r = null; int index = roleExists(Profession, StartedDate); if (index == -1) { r = new role(); roles.Add(r); } else { r = (role)roles[index]; } r.Profession = new profession(Profession); r.Description = Description; r.Affect = Affect; r.SetAcquiredDate(StartedDate); if (skills_list != "") { String[] skills_str = skills_list.Split(','); for (int i = 0; i < skills_str.Length; i++) { String s = skills_str[i]; r.Skills.Add(new skill(s.Trim())); } } int locn_index = soc.LocationExists(Locn, Country); if (locn_index > -1) r.Locn = (location)soc.locations[locn_index]; else r.Locn = soc.AddLocation(Locn, Country, ""); return (r); }