I am querying SharePoint and am pulling data from a multi-line text field. My issue is that only the most recent line is pulled from the multi-line entry.
foreach (ListItem listItem in listItemCollection)
{
Console.WriteLine(listItem[”mtInfo”];
}
I changed my syntax to the below and I get a debug error of Ststem.InvalidCastException: Unable to cast object type System.String to type Sharepoint.client.fieldmultilinetext
foreach (ListItem listItem in listItemCollection)
{
FieldMultiLineText multi = (FieldMultiLineText)listItem[“mtInfo”];
String description = String.Empty;
If (multi != null)
description = multi.ToString();
Console.WriteLine(description);
}