Check if a List Column Exists using SharePoint Client Object Model?

MagicAndi picture MagicAndi · Dec 9, 2010 · Viewed 32.3k times · Source

Using the Client Object Model (C#) in SharePoint 2010, how can I determine if a specified column (field) name exists in a given List?

Thanks, MagicAndi.

Answer

EHorodyski picture EHorodyski · Mar 19, 2012

Just found this while searching for the same thing, but it looks like Sharepoint 2010 has something built in for this, at least for the Server model: list.Fields.ContainsField("fieldName");

Not sure if it exists for Client side though. Figured it would be a good place to store this information however.