Custom Fields in SharePoint 2010

To display the Custom Fields in Sharepoint client side object model, use the property fromBaseType.
if(!field.FromBaseType)
{

Console.WriteLine(This column is custom column"");

}
Here is the complete piece of code as follows
 
ClientContext context = new ClientContext(siteURL);
Web oWebSite = context.Web;
context.Load(oWebSite);
context.ExecuteQuery();
//Get the list by title
List mycustomlist= spLists.GetByTitle("customlist");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View/>";
ListItemCollection listItems = mycustomlist.GetItems(camlQuery);
context.Load(mycustomlist);
context.Load(listItems);
context.Load(mycustomlist.Fields);
context.ExecuteQuery();
foreach(Field field in mycustomlist.Fields)
{
//
    if(!field.FromBaseType)
{
Console
.WriteLine(This column is custom column"");

}
}
Ebook Download
View all
Learn
View all