I am attempting to loop through all the items in a sharepoint List and get the firstname of the requestor.
Requestor is a UserInformationListItem type
var source = dc.Requests;
listBox1.Items.Clear();
foreach (var user in source) {
string name = user.Requestor.FirstName;
listBox1.Items.Add(name);
}
The code that i'm using works fine for getting the ID's of the list items but when it comes to getting anything that would be inside a userinformationlistitem it get the error "Object reference not set to an instance of an object".
Found the Solution: