If you would like to programmatically determine a List Type in C# using the SharePoint Client Object Model, then all you need to do is compare the list’s BaseTemplate, which is an integer identifier, to one of the ListTemplateType enumeration values—casting it to an int as seen below:
bool isDocumentLibrary ;
using (ClientContext clientContext = new ClientContext(baseSiteUrl))
Web web = clientContext.Web;
List list = clientContext.Web.Lists.GetByTitle(listName);
if (list.BaseTemplate == (int)ListTemplateType.DocumentLibrary)
isDocumentLibrary = true;
That’s all there is to it. Now you can take this and modify it in any way that you need to make list type determination more dynamic, if you aren’t just needing to compare to a single ListTemplateType as shown above.