Click here to Skip to main content
15,886,199 members

Comments by Rocky23 (Top 1 by date)

Rocky23 28-Dec-10 8:42am View    
Hi, am getting a error like cannot do type conversion, as i used dictionary in my function..

my function GetUsersByGroup is like this..

public static Dictionary<string, person=""> GetUsersByGroup(string group)
{
Search s = new FWD2Search { Username = DataKey.ldapCredentialValue, Password = DataKey.ldapPassword };
Group grp = s.GetGroup(group);
Dictionary<string, person=""> list = grp.PeopleInGroup;
return list;
}

so will u tell me how can i convert it into string array type to display the users name in the listbox..

string strGroupName = "lrg_prod";
string[] employees = Helper.GetUsersByGroup(strGroupName);
foreach(string employee in employees)
{
lbUsersList.Items.Add(employee);
}