To retrieve the ContentType of a ListItem from the ListItemCollection using the GetItems method, there are two approaches that work.
- If you are not specifying ViewFields in your CAML query then in your Load method you need to Include the ContentType. e.g.
clientContext.Load(listItems, items => items.Include(item => item.ContentType));
- If you CAML query includes ViewFields then two modifications are required. The ViewFields needs to include the ContentTypeId field and the Load method needs to include the ContentType. e.g.
<ViewFields><FieldRef Name='ContentTypeId' /></ViewFields>
clientContext.Load(listItems, items => items.Include(item => item.ContentType));